The document discusses subqueries in SQL, including:
- Types of subqueries like single-row and multiple-row subqueries
- Operators used with different subquery types like =, >, IN, ANY, ALL
- Examples of subqueries used to return rows that meet conditions compared to results of inner queries
After completing this lesson, you should be able to do the following:
Describe the types of problems that subqueries can solve
Define subqueries
List the types of subqueries
Write single-row and multiple-row subqueries
After completing this lesson, you should be able to
do the following:
Describe the types of problem that subqueries can solve
Define subqueries
List the types of subqueries
Write single-row and multiple-row subqueries
http://phpexecutor.com
After completing this lesson, you should be able to do the following:
Write a multiple-column subquery
Describe and explain the behavior of subqueries when null values are retrieved
Write a subquery in a FROM clause
After completing this lesson, you should be able to do the following:
Describe the types of problems that subqueries can solve
Define subqueries
List the types of subqueries
Write single-row and multiple-row subqueries
After completing this lesson, you should be able to
do the following:
Describe the types of problem that subqueries can solve
Define subqueries
List the types of subqueries
Write single-row and multiple-row subqueries
http://phpexecutor.com
After completing this lesson, you should be able to do the following:
Write a multiple-column subquery
Describe and explain the behavior of subqueries when null values are retrieved
Write a subquery in a FROM clause
After completing this lesson, you should be able to do the following:
Describe a view
Create a view
Retrieve data through a view
Alter the definition of a view
Insert, update, and delete data through a view
Drop a view
Les05[1]Aggregating Data Using Group Functionssiavosh kaviani
After completing this lesson, you should be able to do the following:
Identify the available group functions
Describe the use of group functions
Group data using the GROUP BY clause
Include or exclude grouped rows by using the HAVING clause
After completing this lesson, you should be able to do the following:
Describe each DML statement
Insert rows into a table
Update rows in a table
Delete rows from a table
Control transactions
Aggregating Data Using Group FunctionsSalman Memon
After completing this lesson, you should be able to
do the following:
Identify the available group functions
Describe the use of group functions
Group data using the GROUP BY clause
Include or exclude grouped rows by using the HAVING clause
http://phpexecutor.com
Les08[1] Producing Readable Output with SQL*Plussiavosh kaviani
After completing this lesson, you should be able to do the following:
Produce queries that require an input variable
Customize the SQL*Plus environment
Produce more readable output
Create and execute script files
Save customizations
After completing this lesson, you should be able to do the following:
Describe a view
Create a view
Retrieve data through a view
Alter the definition of a view
Insert, update, and delete data through a view
Drop a view
Les05[1]Aggregating Data Using Group Functionssiavosh kaviani
After completing this lesson, you should be able to do the following:
Identify the available group functions
Describe the use of group functions
Group data using the GROUP BY clause
Include or exclude grouped rows by using the HAVING clause
After completing this lesson, you should be able to do the following:
Describe each DML statement
Insert rows into a table
Update rows in a table
Delete rows from a table
Control transactions
Aggregating Data Using Group FunctionsSalman Memon
After completing this lesson, you should be able to
do the following:
Identify the available group functions
Describe the use of group functions
Group data using the GROUP BY clause
Include or exclude grouped rows by using the HAVING clause
http://phpexecutor.com
Les08[1] Producing Readable Output with SQL*Plussiavosh kaviani
After completing this lesson, you should be able to do the following:
Produce queries that require an input variable
Customize the SQL*Plus environment
Produce more readable output
Create and execute script files
Save customizations
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
2. 6-2 Copyright Oracle Corporation, 1998. All rights reserved.
Objectives
After completing this lesson, you should
be able to do the following:
• Describe the types of problems that
subqueries can solve
• Define subqueries
• List the types of subqueries
• Write single-row and multiple-row
subqueries
3. 6-3 Copyright Oracle Corporation, 1998. All rights reserved.
Using a Subquery
to Solve a Problem
“Who has a salary greater than Jones’?”
“Which employees have a salary greater
than Jones’ salary?”
Main Query
?
“What is Jones’ salary?”
?
Subquery
4. 6-4 Copyright Oracle Corporation, 1998. All rights reserved.
Subqueries
• The subquery (inner query) executes
once before the main query.
• The result of the subquery is used by
the main query (outer query).
SELECT select_list
FROM table
WHERE expr operator
(SELECT select_list
FROM table);
5. 6-5 Copyright Oracle Corporation, 1998. All rights reserved.
Using a Subquery
Display the names of those employees
who earn more than
employee no 7566.
6. 6-6 Copyright Oracle Corporation, 1998. All rights reserved.
2975
SQL> SELECT ename
2 FROM emp
3 WHERE sal >
4 (SELECT sal
5 FROM emp
6 WHERE empno=7566);
Using a Subquery
ENAME
----------
KING
FORD
SCOTT
7. 6-7 Copyright Oracle Corporation, 1998. All rights reserved.
Guidelines for Using Subqueries
• Enclose subqueries in parentheses.
• Place subqueries on the right side of the
comparison operator.
• Do not add an ORDER BY clause to a subquery.
• Use single-row operators with single-row
subqueries.
• Use multiple-row operators with multiple-row
subqueries.
8. 6-8 Copyright Oracle Corporation, 1998. All rights reserved.
Types of Subqueries
• Single-row subquery
Main query
Subquery
returns
CLERK
• Multiple-row subquery
CLERK
MANAGER
Main query
Subquery
returns
• Multiple-column subquery
CLERK 7900
MANAGER 7698
Main query
Subquery
returns
9. 6-9 Copyright Oracle Corporation, 1998. All rights reserved.
Single-Row Subqueries
• Return only one row
• Use single-row comparison operators
Operator
=
>
>=
<
<=
<>
Meaning
Equal to
Greater than
Greater than or equal to
Less than
Less than or equal to
Not equal to
10. 6-10 Copyright Oracle Corporation, 1998. All rights reserved.
Executing Single-Row Subqueries
Display name and job of all those employees
who have same job as employee no 7369
and
who have salary greater than the salary of
employee no 7876.
11. 6-11 Copyright Oracle Corporation, 1998. All rights reserved.
Executing Single-Row Subqueries
CLERK
1100
ENAME JOB
---------- ---------
MILLER CLERK
SQL> SELECT ename, job
2 FROM emp
3 WHERE job =
4 (SELECT job
5 FROM emp
6 WHERE empno = 7369)
7 AND sal >
8 (SELECT sal
9 FROM emp
10 WHERE empno = 7876);
12. 6-12 Copyright Oracle Corporation, 1998. All rights reserved.
Using Group Functions
in a Subquery
Display name, job and salary of those employees
who have
Salary equal to the minimum salary.
13. 6-13 Copyright Oracle Corporation, 1998. All rights reserved.
Using Group Functions
in a Subquery
800
ENAME JOB SAL
---------- --------- ---------
SMITH CLERK 800
SQL> SELECT ename, job, sal
2 FROM emp
3 WHERE sal =
4 (SELECT MIN(sal)
5 FROM emp);
14. 6-14 Copyright Oracle Corporation, 1998. All rights reserved.
HAVING Clause with Subqueries
• The Oracle Server executes subqueries first.
• The Oracle Server returns results into the
HAVING clause of the main query.
800
Display department no, minimum salary
of each department
who have minimum salary
greater than the
minimum salary of department no 20.
15. 6-15 Copyright Oracle Corporation, 1998. All rights reserved.
HAVING Clause with Subqueries
800
SQL> SELECT deptno, MIN(sal)
2 FROM emp
3 GROUP BY deptno
4 HAVING MIN(sal) >
5 (SELECT MIN(sal)
6 FROM emp
7 WHERE deptno = 20);
16. 6-16 Copyright Oracle Corporation, 1998. All rights reserved.
What Is Wrong with This Statement?
ERROR:
ORA-01427: single-row subquery returns more than
one row
no rows selected
SQL> SELECT empno, ename
2 FROM emp
3 WHERE sal =
4 (SELECT MIN(sal)
5 FROM emp
6 GROUP BY deptno);
17. 6-17 Copyright Oracle Corporation, 1998. All rights reserved.
Will This Statement Work?
no rows selected
SQL> SELECT ename, job
2 FROM emp
3 WHERE job =
4 (SELECT job
5 FROM emp
6 WHERE ename='SMYTHE');
18. 6-18 Copyright Oracle Corporation, 1998. All rights reserved.
Multiple-Row Subqueries
• Return more than one row
• Use multiple-row comparison operators
Operator
IN
ANY
ALL
Meaning
Equal to any member in the list
Compare value to each value returned by
the subquery
Compare value to every value returned by
the subquery
19. 6-19 Copyright Oracle Corporation, 1998. All rights reserved.
Using the IN Operator
Use the IN operator to test for values in a
list.
SQL> SELECT empno, ename, sal, mgr
2 FROM emp
3 WHERE mgr IN (7902, 7566, 7788);
EMPNO ENAME SAL MGR
--------- ---------- --------- ---------
7902 FORD 3000 7566
7369 SMITH 800 7902
7788 SCOTT 3000 7566
7876 ADAMS 1100 7788
Subquery
20. 6-20 Copyright Oracle Corporation, 1998. All rights reserved.
Using ANY Operator
in Multiple-Row Subqueries
950
800
1100
1300
EMPNO ENAME JOB
--------- ---------- ---------
7654 MARTIN SALESMAN
7521 WARD SALESMAN
SQL> SELECT empno, ename, job
2 FROM emp
3 WHERE sal < ANY
4 (SELECT sal
5 FROM emp
6 WHERE job = 'CLERK')
7 AND job <> 'CLERK';
EMP
DEPTNO JOB SAL
------ --------- -------
10 MANAGER 2450
10 PRESIDENT 5000
10 CLERK 1300
20 CLERK 800
20 CLERK 1100
20 ANALYST 3000
20 ANALYST 3000
20 MANAGER 2975
30 SALESMAN 1600
30 MANAGER 2850
30 SALESMAN 1250
30 CLERK 950
30 SALESMAN 1500
30 SALESMAN 1250
21. 6-21 Copyright Oracle Corporation, 1998. All rights reserved.
Using ALL Operator
in Multiple-Row Subqueries
2916.6667
2175
1566.6667
EMPNO ENAME JOB
--------- ---------- ---------
7839 KING PRESIDENT
7566 JONES MANAGER
7902 FORD ANALYST
7788 SCOTT ANALYST
SQL> SELECT empno, ename, job
2 FROM emp
3 WHERE sal > ALL
4 (SELECT avg(sal)
5 FROM emp
6 GROUP BY deptno);
DEPTNO SAL
------ -------
10 2450
10 5000
10 1300
20 800
20 1100
20 3000
20 3000
20 2975
30 1600
30 2850
30 1250
30 950
30 1500
30 1250
DEPTNO AVG(SAL)
------- ---------
10 2916.6667
20 2175
30 1566.6667
22. 6-22 Copyright Oracle Corporation, 1998. All rights reserved.
Select all customers where rating is bigger than
the rating of all customers living in Berlin.
SELECT *
FROM XYZ
WHERE rating > ALL ( SELECT rating FROM XYZ
WHERE stadt='Berlin' );
23. 6-23 Copyright Oracle Corporation, 1998. All rights reserved.
Select all customers with rating bigger than
rating of at least one of living in Berlin.
SELECT *
FROM tkunden
WHERE rating > ANY ( SELECT rating FROM
tkunden WHERE stadt='Berlin' );