
This will return the result 2, as there is two distinct products and year combination (Pro3-2022, Pro2-2018) in the product_mast table with a price greater than 400. If we want to count the number of distinct product and year combinations with a price greater than 400, we can use the following SQL query: SELECT COUNT(DISTINCT (prod, year)) This will return the result 2, as there are two distinct products (Pro1 and Pro2) sold in the year 2018 with a price greater than 300. To count the number of distinct products sold in the year 2018 with a price greater than 300, we can use the following SQL query: SELECT COUNT(DISTINCT prod)įROM product_mast WHERE year = 2018 AND price > 300 This will return the result 4, as there are four distinct product and year combinations (Pro1-2018, Pro2-2019, Pro2-2018, and Pro3-2019) in the product_mast table. If we want to count the number of distinct product and year combinations, we can use the following SQL query: SELECT COUNT(DISTINCT (prod, year)) This will return the result 2, as there are two distinct products (Pro1 and Pro2) sold in the year 2018. If you already have an understanding on SQL and other computer programming language, then it will be an added advantage to proceed.To count the number of distinct products sold in the year 2018, we can use the following SQL query: SELECT COUNT(DISTINCT prod) Prerequisitesīefore proceeding with this tutorial, you should have a basic understanding of software basic concepts like what is database, source code, text editor and execution of programs, etc. This tutorial will give you great understanding on PL/SQL Programming concepts, and after completing this tutorial, you will be at an intermediate level of expertise from where you can take yourself to a higher level of expertise. This tutorial is designed for Software Professionals, who are willing to learn PL/SQL Programming Language in simple and easy steps. This tutorial will give you great understanding on PL/SQL to proceed with Oracle database and other advanced RDBMS concepts.

PL/SQL is one of three key programming languages embedded in the Oracle Database, along with SQL itself and Java. It was developed by Oracle Corporation in the early 90's to enhance the capabilities of SQL. PL/SQL is a combination of SQL along with the procedural features of programming languages. PDF Version Quick Guide Resources Job Search Discussion
