{"id":27876,"date":"2026-08-18T02:06:39","date_gmt":"2026-08-18T02:06:39","guid":{"rendered":"https:\/\/umang.pk\/2026\/08\/18\/%d8%a7%db%8c%d8%b3-%da%a9%db%8c%d9%88-%d8%a7%db%8c%d9%84-%d9%85%db%8c%da%ba-%d8%b0%db%8c%d9%84%db%8c-%d8%b3%d9%88%d8%a7%d9%84%d8%a7%d8%aa-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9\/"},"modified":"2026-08-18T02:06:41","modified_gmt":"2026-08-18T02:06:41","slug":"%d8%a7%db%8c%d8%b3-%da%a9%db%8c%d9%88-%d8%a7%db%8c%d9%84-%d9%85%db%8c%da%ba-%d8%b0%db%8c%d9%84%db%8c-%d8%b3%d9%88%d8%a7%d9%84%d8%a7%d8%aa-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9","status":"publish","type":"post","link":"https:\/\/umang.pk\/en_us\/2026\/08\/18\/%d8%a7%db%8c%d8%b3-%da%a9%db%8c%d9%88-%d8%a7%db%8c%d9%84-%d9%85%db%8c%da%ba-%d8%b0%db%8c%d9%84%db%8c-%d8%b3%d9%88%d8%a7%d9%84%d8%a7%d8%aa-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9\/","title":{"rendered":"\u0627\u06cc\u0633 \u06a9\u06cc\u0648 \u0627\u06cc\u0644 \u0645\u06cc\u06ba \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0633\u06d2 \u06a9\u0631\u06cc\u06ba\u06d4"},"content":{"rendered":"<div id=\"\">\n<p>\u062c\u0628 \u0628\u06be\u06cc \u0622\u067e \u0627\u06cc\u0633 \u06a9\u06cc\u0648 \u0627\u06cc\u0644 \u0645\u06cc\u06ba \u06a9\u0633\u06cc \u062f\u0648\u0633\u0631\u06d2 \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0627\u0646\u062f\u0631 \u0627\u0646\u062f\u0631 \u06a9\u0648\u0626\u06cc \u0633\u0648\u0627\u0644 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06c1\u06d2\u06d4 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0633\u0648\u0627\u0644 \u0628\u06be\u06cc \u06a9\u06c1\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0645\u06cc\u0646 \u0633\u0648\u0627\u0644 \u06cc\u0627 \u0628\u06cc\u0631\u0648\u0646\u06cc \u0633\u0648\u0627\u0644 \u06a9\u06c1\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631\u0627\u062a \u06a9\u0648 \u0645\u0627\u062e\u0648\u0630 \u06a9\u0627\u0644\u0645\u0648\u06ba \u06cc\u0627 \u0627\u062e\u0630 \u06a9\u0631\u062f\u06c1 \u062c\u062f\u0648\u0644\u0648\u06ba \u06a9\u06cc \u0634\u06a9\u0644 \u0645\u06cc\u06ba \u0627\u0636\u0627\u0641\u06cc \u0688\u06cc\u0679\u0627 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u060c \u06cc\u0627 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0648\u0627\u067e\u0633 \u0622\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0642\u0637\u0627\u0631\u0648\u06ba \u06a9\u0648 \u0641\u0644\u0679\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u06d4<\/p>\n<p>\u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631\u0627\u062a \u06a9\u0648 \u0633\u0645\u062c\u06be\u0646\u0627 \u0628\u06c1\u062a \u0645\u0634\u06a9\u0644 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u060c \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0646 \u0627\u0628\u062a\u062f\u0627\u0626\u06cc\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u0635\u0631\u0641 SQL \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0634\u0631\u0648\u0639\u0627\u062a \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0645\u0636\u0645\u0648\u0646 \u0627\u0633 \u062a\u0635\u0648\u0631 \u06a9\u0648 \u0622\u0633\u0627\u0646 \u0628\u0646\u0627\u0646\u06d2 \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0633\u0645\u062c\u06be\u0646\u06d2 \u0645\u06cc\u06ba \u0628\u06c1\u062a \u0622\u0633\u0627\u0646 \u0628\u0646\u0627\u0646\u06d2 \u0645\u06cc\u06ba \u0645\u062f\u062f \u06a9\u0631\u06d2 \u06af\u0627\u06d4 \u06cc\u06c1 \u0628\u0627\u0644\u0622\u062e\u0631 \u0645\u0633\u0627\u0626\u0644 \u06a9\u0648 \u062d\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0622\u0633\u0627\u0646 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-table-of-contents\">\u0627\u0646\u0688\u06cc\u06a9\u0633<\/h3>\n<h3 id=\"heading-prerequisites\">\u0634\u0631\u0627\u0626\u0637:<\/h3>\n<p>\u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u0627\u06cc\u06a9 \u0627\u0639\u0644\u06cc \u062f\u0631\u062c\u06d2 \u06a9\u0627 SQL \u062a\u0635\u0648\u0631 \u06c1\u06d2\u060c \u0627\u0633 \u0644\u06cc\u06d2 SQL \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f\u06cc \u0628\u0627\u062a\u0648\u06ba \u06a9\u06cc \u0679\u06be\u0648\u0633 \u0633\u0645\u062c\u06be \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u0627 \u0636\u0631\u0648\u0631\u06cc \u06c1\u06d2: SELECT\u060c FROM\u060c WHERE\u060c JOINS\u060c \u0627\u0648\u0631 CASE \u0627\u0633\u0679\u06cc\u0679\u0645\u0646\u0679\u0633 \u0627\u0648\u0631 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u06a9\u06cc \u0645\u0646\u0627\u0633\u0628 \u062a\u0631\u062a\u06cc\u0628\u06d4<\/p>\n<h2 id=\"heading-how-subqueries-work\">\u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/h2>\n<p>\u0622\u0626\u06cc\u06d2 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06cc \u0627\u06cc\u06a9 \u0645\u062b\u0627\u0644 \u06a9\u0648 \u062f\u06cc\u06a9\u06be \u06a9\u0631 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT *\nFROM registration\nWHERE student_id \n                IN (SELECT \n                        id \n                    FROM student\n                    WHERE location = 'Lagos')\n<\/code><\/pre>\n<p>\u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u062f\u0648 \u062d\u0635\u0648\u06ba \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2: \u0645\u06cc\u0646 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0627\u0648\u0631 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631\u06d4<\/p>\n<p>\u0627\u06c1\u0645 \u0633\u0648\u0627\u0644 \u06cc\u06c1 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-sql\">SELECT *\nFROM registration\nWHERE student_id \n                IN (...)\n<\/code><\/pre>\n<p>\u0641\u06cc \u0627\u0644\u062d\u0627\u0644 \u0645\u06cc\u0646 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba \u0642\u0648\u0633\u06cc\u0646 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u06a9\u0686\u06be \u0628\u06be\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0631\u0628\u0639 \u0628\u0631\u06cc\u06a9\u0679 \u0645\u06cc\u06ba \u0628\u0646\u062f \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0627 \u062d\u0635\u06c1 \u0627\u06cc\u06a9 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06c1\u06d2\u06d4 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0648\u0627\u067e\u0633 \u0622\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0642\u0637\u0627\u0631\u0648\u06ba \u06a9\u0648 \u0641\u0644\u0679\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0628 \u0630\u06cc\u0644\u06cc \u06a9\u0648\u0688 \u06a9\u0648 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT \n    id \nFROM student \nWHERE location = 'Lagos'\n<\/code><\/pre>\n<h3 id=\"heading-execution-order\">\u067e\u06be\u0627\u0646\u0633\u06cc \u06a9\u0627 \u062d\u06a9\u0645<\/h3>\n<p>\u0627\u06af\u0631 \u0622\u067e \u067e\u0648\u0631\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0645\u06cc\u0646\u062c\u0645\u0646\u0679 \u0633\u0633\u0679\u0645 \u067e\u0631 \u0627\u0633 \u0637\u0631\u062d \u0686\u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-sql\">SELECT *\nFROM registration\nWHERE student_id \n                IN (SELECT \n                        id \n                    FROM student\n                    WHERE location = 'Lagos')\n<\/code><\/pre>\n<p>\u0622\u067e \u06a9\u0648 \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u0646\u062a\u06cc\u062c\u06c1 \u0645\u0644\u06d2 \u06af\u0627:<\/p>\n<p>\u0646\u062a\u0627\u0626\u062c \u0644\u0627\u06af\u0648\u0633 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u062f\u06a9\u06be\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u062a\u0627\u06c1\u0645\u060c \u0627\u0633 \u0646\u062a\u06cc\u062c\u06c1 \u06a9\u0648 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0627\u06cc\u0633 \u06a9\u06cc\u0648 \u0627\u06cc\u0644 \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u0628\u06cc\u0627\u0646 \u06a9\u0631\u062f\u06c1 \u0627\u06cc\u06a9 \u0639\u0645\u0644\u062f\u0631\u0622\u0645\u062f \u0622\u0631\u0688\u0631 \u06a9\u06cc \u067e\u06cc\u0631\u0648\u06cc \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u062c\u0628 \u0622\u067e \u0645\u06a9\u0645\u0644 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0686\u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0633\u0628 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u067e\u0633 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u0627 \u062c\u0627\u0626\u0632\u06c1 \u0644\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT \n    id \nFROM student \nWHERE location = 'Lagos'\n<\/code><\/pre>\n<p>\u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u0645\u06cc\u0632 \u0633\u06d2 \u0644\u0627\u06af\u0648\u0633 \u06a9\u06d2 \u0627\u06cc\u06a9 \u0637\u0627\u0644\u0628 \u0639\u0644\u0645 \u06a9\u06cc ID \u0628\u0627\u0632\u06cc\u0627\u0641\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0622\u067e \u06a9\u0648 \u062f\u0631\u062c \u0630\u06cc\u0644 \u0646\u062a\u06cc\u062c\u06c1 \u0645\u0644\u062a\u0627 \u06c1\u06d2:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_339_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u0646\u062a\u0627\u0626\u062c \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06c1 \u0648\u0627\u067e\u0633 \u06a9\u06cc \u06af\u0626\u06cc \u0627\u0642\u062f\u0627\u0631 \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0628 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0628\u0627\u06c1\u0631 \u0639\u0645\u0644 \u0645\u06cc\u06ba \u0644\u0627\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"237\" height=\"194\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u067e\u0631\u062f\u06d2 \u06a9\u06d2 \u067e\u06cc\u0686\u06be\u06d2\u060c \u06cc\u06c1 \u06c1\u06d2 <code>IDs<\/code> \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0648\u0627\u067e\u0633 \u06a9\u0631\u062f\u06c1 \u0645\u0648\u0627\u062f \u06a9\u0648 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba \u0641\u06cc\u0688 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062c\u0633 \u0633\u06d2 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0627\u0633 \u0637\u0631\u062d \u062a\u0628\u062f\u06cc\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-sql\">SELECT *\nFROM registration\nWHERE student_id \n            IN('STU1', 'STU13','STU2','STU4','STU23','STU27')\n<\/code><\/pre>\n<p>\u0628\u0646\u06cc\u0627\u062f\u06cc \u0633\u0648\u0627\u0644 \u06c1\u0631 \u0642\u062f\u0631 \u06a9\u0627 \u0645\u0648\u0627\u0632\u0646\u06c1 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>student_id<\/code> \u06af\u0631\u0645\u06cc <code>IDs<\/code> \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0648\u0627\u067e\u0633 \u0622\u06cc\u0627\u06d4 \u0627\u06af\u0631 \u06a9\u0648\u0626\u06cc \u0645\u0645\u0627\u062b\u0644\u062a \u067e\u0627\u0626\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u062a\u0648\u060c \u0637\u0627\u0644\u0628 \u0639\u0644\u0645 \u06a9\u06cc \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u0648\u0627\u067e\u0633 \u06a9\u0631\u062f\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u0648\u0631\u0646\u06c1 \u0631\u06cc\u06a9\u0627\u0631\u0688 \u0646\u0638\u0631 \u0627\u0646\u062f\u0627\u0632 \u06a9\u0631 \u062f\u06cc\u0627 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<p>\u0622\u067e \u0633\u0648\u0686 \u0631\u06c1\u06d2 \u06c1\u0648\u06ba \u06af\u06d2\u060c &quot;\u0635\u0631\u0641 \u062a\u0644\u0627\u0634 \u06a9\u06cc\u0648\u06ba \u0646\u06c1\u06cc\u06ba\u061f&#8221; <code>IDs<\/code> \u06a9\u06cc\u0627 \u0622\u067e \u0627\u0633\u06d2 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0627\u0633\u0679\u0648\u0688\u0646\u0679 \u0679\u06cc\u0628\u0644 \u0633\u06d2 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0645\u06cc\u0646 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u0645\u0646\u062a\u0642\u0644 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06ba \u06af\u06d2\u061f&#8221;<\/p>\n<p>\u0679\u06be\u06cc\u06a9 \u06c1\u06d2\u060c \u06cc\u06c1 \u0645\u0634\u06a9\u0644 \u06a9\u0648\u0688\u0646\u06af \u06c1\u06d2. \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0627\u0628 \u06a9\u0627\u0645 \u06a9\u0631 \u0631\u06c1\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0628\u0639\u062f \u0645\u06cc\u06ba \u062c\u0628 \u0645\u06cc\u0631\u06d2 \u067e\u0627\u0633 \u0646\u0626\u06d2 \u0637\u0644\u0628\u0627\u0621 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0645\u06cc\u06ba \u062f\u0648\u0628\u0627\u0631\u06c1 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u0648\u06ba\u060c \u062a\u0648 \u0645\u062c\u06be\u06d2 \u0635\u0631\u0641 \u0627\u0646 \u067e\u0631\u0627\u0646\u06d2 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u0645\u0644\u062a\u06cc \u06c1\u06cc\u06ba \u062c\u0646 \u0633\u06d2 \u0645\u06cc\u06ba \u062f\u0633\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u06af\u0632\u0631\u0627 \u062a\u06be\u0627\u06d4 <code>IDs<\/code> \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u062c\u0627\u0626\u06cc\u06ba\u06d4 \u0646\u0626\u06d2 \u06a9\u0648 \u062e\u0627\u0631\u062c \u06a9\u0631 \u062f\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u0627 \u0646\u0642\u0637\u06c1 \u0646\u0638\u0631 \u0645\u062a\u062d\u0631\u06a9 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u0645\u06cc\u0632 \u0633\u06d2 \u0645\u0633\u0644\u0633\u0644 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u062a\u0627\u06a9\u06c1 \u06cc\u06c1 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u06d2 \u06a9\u06c1 \u0646\u062a\u0627\u0626\u062c \u06c1\u0645\u06cc\u0634\u06c1 \u062a\u0627\u0632\u06c1 \u062a\u0631\u06cc\u0646 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-types-of-subqueries\">\u0633\u0628\u06a9\u06cc\u0631\u06cc \u06a9\u06cc \u0642\u0633\u0645<\/h2>\n<p>\u0627\u0646\u062d\u0635\u0627\u0631 \u067e\u0631 \u0645\u0628\u0646\u06cc \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u06cc \u062f\u0648 \u0642\u0633\u0645\u06cc\u06ba \u06c1\u06cc\u06ba: \u063a\u06cc\u0631 \u0645\u062a\u0639\u0644\u0642\u06c1 (\u0622\u0632\u0627\u062f) \u0627\u0648\u0631 \u0645\u0631\u0628\u0648\u0637 (\u0627\u0646\u062d\u0635\u0627\u0631)\u06d4<\/p>\n<h3 id=\"heading-non-correlated-subqueries\">\u063a\u06cc\u0631 \u0645\u062a\u0639\u0644\u0642\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631<\/h3>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06c1\u06d2 \u062c\u0648 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0622\u0632\u0627\u062f \u06c1\u06d2\u06d4 \u06cc\u06c1 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u06af\u0631 \u0645\u06cc\u06ba \u0627\u0633\u06d2 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0628\u0627\u06c1\u0631 \u0686\u0644\u0627\u062a\u0627 \u06c1\u0648\u06ba\u06d4 \u0627\u06cc\u06a9 \u0627\u0686\u06be\u06cc \u0645\u062b\u0627\u0644 \u0648\u06c1 \u06c1\u06d2 \u062c\u0648 \u0627\u0648\u067e\u0631 \u06a9\u06d2 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc \u06af\u0626\u06cc \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT *\nFROM registration\nWHERE student_id \n                IN (SELECT \n                        id \n                    FROM student\n                    WHERE location = 'Lagos')\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0646\u0648\u0679 \u06a9\u0631\u0646\u0627 \u0636\u0631\u0648\u0631\u06cc \u06c1\u06d2 \u06a9\u06c1 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a SQL \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u062f\u0648\u0633\u0631\u06d2 \u062d\u0635\u0648\u06ba \u0645\u06cc\u06ba \u0638\u0627\u06c1\u0631 \u06c1\u0648 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0642\u0637\u0639 \u0646\u0638\u0631 \u0627\u0633 \u0633\u06d2 \u06a9\u06c1 \u0648\u06c1 \u0645\u062a\u0639\u0644\u0642\u06c1 \u06c1\u06cc\u06ba \u06cc\u0627 \u0646\u06c1\u06cc\u06ba\u06d4 \u062c\u06c1\u0627\u06ba \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba \u0627\u0633 \u06a9\u06d2 \u06a9\u0631\u062f\u0627\u0631 \u06a9\u0627 \u062a\u0639\u06cc\u0646 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0627\u062e\u0630 \u06a9\u0631\u062f\u06c1 \u06a9\u0627\u0644\u0645\u060c \u0627\u062e\u0630 \u06a9\u0631\u062f\u06c1 \u0679\u06cc\u0628\u0644\u060c \u06cc\u0627 \u0641\u0644\u0679\u0631 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0627\u0645 \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0622\u0626\u06cc\u06d2 \u0627\u06cc\u06a9 \u0627\u06c1\u0645 \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0645\u062e\u062a\u0644\u0641 \u062d\u0635\u0648\u06ba \u067e\u0631 \u0628\u0627\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u06c1\u0627\u06ba \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631\u0627\u062a \u0638\u0627\u06c1\u0631 \u06c1\u0648 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u06a9\u0633 \u0637\u0631\u062d \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631\u0627\u062a \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06cc \u062d\u0645\u0627\u06cc\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h4 id=\"heading-1-subquery-as-a-derived-column\">1. \u0645\u0627\u062e\u0648\u0630 \u06a9\u0627\u0644\u0645 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631<\/h4>\n<p>\u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u0648\u0626\u06d2: <code>SELECT<\/code> \u0628\u06cc\u0627\u0646\u060c \u0645\u0627\u062e\u0648\u0630 \u06a9\u0627\u0644\u0645\u06d4 \u0627\u062e\u0630 \u06a9\u0631\u062f\u06c1 \u06a9\u0627\u0644\u0645 \u0679\u06cc\u0628\u0644 \u0645\u06cc\u06ba \u06a9\u0633\u06cc \u062f\u0648\u0633\u0631\u06d2 \u06a9\u0627\u0644\u0645 \u06a9\u06cc \u0642\u062f\u0631\u0648\u06ba \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u062a\u062e\u0644\u06cc\u0642 \u06a9\u0631\u062f\u06c1 \u06a9\u0627\u0644\u0645 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0645\u06cc\u06ba \u0645\u062d\u0641\u0648\u0638 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u0627\u0648\u0631 \u0635\u0631\u0641 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06cc \u0645\u062f\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0648\u062c\u0648\u062f \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631\u060c \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06d2 \u06a9\u0644 \u0641\u06cc\u0635\u062f \u06a9\u0627 \u062d\u0633\u0627\u0628 \u0644\u06af\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0622\u067e \u06a9\u0648 \u0627\u06cc\u06a9 \u06c1\u06cc \u0642\u0637\u0627\u0631 \u0645\u06cc\u06ba \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u06a9\u06d2 \u062a\u06cc\u0646 \u0679\u06a9\u0691\u0648\u06ba \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2:<\/p>\n<p>\u0634\u0631\u0648\u0639 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0622\u067e \u0627\u06cc\u06a9 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0644\u06a9\u06be \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0646\u0627\u0645 \u0627\u0648\u0631 \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT\n    course_name,\n    COUNT(reg_id) AS registrations\nFROM course AS l\nLEFT JOIN registration AS r\nON l.id = r.course_id\nGROUP BY course_name\n<\/code><\/pre>\n<p>\u0646\u062a\u06cc\u062c\u06c1:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_672_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0627\u0648\u06cc\u0631 \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u0627 \u0646\u0627\u0645 \u0627\u0648\u0631 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4\" style=\"display:block;margin:0 auto\" width=\"257\" height=\"216\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0628\u0646\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0641\u06c1\u0631\u0633\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0644 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06d2 \u0641\u06cc\u0635\u062f \u06a9\u0627 \u062d\u0633\u0627\u0628 \u0644\u06af\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0644 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u0648 \u0628\u06be\u06cc \u0627\u06c1\u0645 \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u06c1\u0631 \u0642\u0637\u0627\u0631 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4<\/p>\n<p>\u0627\u0633 \u06a9\u0648 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0622\u067e \u0627\u06cc\u06a9 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c\u0627\u062a \u06a9\u06cc \u06a9\u0644 \u062a\u0639\u062f\u0627\u062f \u06a9\u0648 \u0628\u0637\u0648\u0631 \u06a9\u0627\u0644\u0645 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u0648\u0627\u067e\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u062c\u06cc\u0633\u0627 \u06a9\u06c1:<\/p>\n<pre><code class=\"language-sql\">SELECT COUNT(reg_id) FROM registration\n<\/code><\/pre>\n<p>\u062c\u0628 \u0627\u0633 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0628\u0627\u06c1\u0631 \u0627\u0646\u062c\u0627\u0645 \u062f\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u06cc\u06c1 \u0630\u06cc\u0644 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_133_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u0627\u06cc\u06a9 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u062f\u06a9\u06be\u0627\u062a\u06cc \u06c1\u06d2 \u062c\u0648 \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u06a9\u0644 \u062a\u0639\u062f\u0627\u062f \u06a9\u0627 \u062d\u0633\u0627\u0628 \u0644\u06af\u0627\u062a\u06cc \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"169\" height=\"83\" loading=\"lazy\" title=\"\"><\/p>\n<p>30 \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u06a9\u0644 \u062a\u0639\u062f\u0627\u062f \u06c1\u06d2\u06d4 \u0627\u0628 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u0648 \u0645\u0631\u06a9\u0632\u06cc \u0633\u0648\u0627\u0644 \u06a9\u0627 \u06a9\u0627\u0644\u0645 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u0633\u06d2 \u0645\u0631\u0628\u0639 \u0628\u0631\u06cc\u06a9\u0679 \u0645\u06cc\u06ba \u0627\u0633 \u0637\u0631\u062d \u0628\u0646\u062f \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-sql\">(SELECT COUNT(reg_id) FROM registration)\n<\/code><\/pre>\n<p>\u067e\u06be\u0631 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u0648 \u0645\u0631\u06a9\u0632\u06cc \u0633\u0648\u0627\u0644 \u06a9\u06cc \u06a9\u0627\u0644\u0645 \u0641\u06c1\u0631\u0633\u062a \u0645\u06cc\u06ba \u062f\u0627\u062e\u0644 \u06a9\u0631\u06cc\u06ba \u062c\u06cc\u0633\u0627 \u06a9\u06c1 \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u062f\u06a9\u06be\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT\n    course_name,\n    COUNT(reg_id) AS regs,\n    (SELECT COUNT(reg_id) FROM registration) AS total --subquery\nFROM course AS l\nLEFT JOIN registration AS r\nON l.id = r.course_id\nGROUP BY course_name\n<\/code><\/pre>\n<p>\u062c\u0628 \u0686\u0644\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u06cc\u06c1 \u062f\u0631\u062c \u0630\u06cc\u0644 \u0646\u062a\u0627\u0626\u062c \u062f\u06cc\u062a\u0627 \u06c1\u06d2:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_713_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u0645\u06cc\u06ba \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0646\u0627\u0645\u060c \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f\u060c \u0627\u0648\u0631 \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u06a9\u0644 \u062a\u0639\u062f\u0627\u062f \u062f\u06a9\u06be\u0627\u0626\u06cc \u062f\u06cc\u062a\u06cc \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"324\" height=\"249\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u062c\u062f\u0648\u0644 \u0645\u06cc\u06ba\u060c \u0628\u0646\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u0627 \u0646\u0627\u0645 \u0627\u0648\u0631 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u06af\u0646\u062a\u06cc \u06a9\u0648 \u0639\u0631\u0641 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0648\u0627\u067e\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>regs<\/code>. \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06c1\u06d2\u06d4 <code>total<\/code> \u0627\u06cc\u06a9 \u06a9\u0627\u0644\u0645 \u062c\u0633 \u0645\u06cc\u06ba \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u06a9\u0644 \u062a\u0639\u062f\u0627\u062f (30) \u06c1\u0648\u06d4 \u0642\u06cc\u0645\u062a (30) \u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u06c1\u0631 \u0642\u0637\u0627\u0631 \u0645\u06cc\u06ba \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0646\u0627\u0645\u060c \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f\u060c \u0627\u0648\u0631 \u06c1\u0631 \u0642\u0637\u0627\u0631 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0644 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2\u060c \u0627\u0628 \u06c1\u0645 \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0644 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06d2 \u0641\u06cc\u0635\u062f \u06a9\u0627 \u062d\u0633\u0627\u0628 \u0644\u06af\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><strong>\u0633\u0631\u06a9\u0627\u0631\u06cc:<\/strong><\/p>\n<pre><code class=\"language-markdown\">Percentage of Total = regs \/ total * 100\n<\/code><\/pre>\n<p>\u0633\u0628 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u062f\u0648\u0646\u0648\u06ba <code>regs<\/code> \u0627\u0648\u0631 <code>total<\/code> \u06a9\u0627\u0644\u0645 \u0645\u06cc\u06ba \u0639\u062f\u062f\u06cc \u0627\u0642\u062f\u0627\u0631 \u06c1\u06cc\u06ba\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u062a\u0642\u0633\u06cc\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0646\u062a\u06cc\u062c\u06c1 0 \u06c1\u0648\u06af\u0627\u06d4 \u0627\u0633\u06d2 \u0631\u0648\u06a9\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u06c1\u0645\u06cc\u0634\u06c1 <code>FLOAT<\/code> \u0688\u06cc\u0679\u0627 \u06a9\u06cc \u0627\u0642\u0633\u0627\u0645 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 <code>CAST()<\/code> \u06cc\u06c1 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-sql\">-- casting numerator to float data type\nCAST(\n    COUNT(reg_id) \n     AS FLOAT)\n<\/code><\/pre>\n<p>\u0645\u0627\u0644\u06cc\u06a9\u06cc\u0648\u0644\u0632 \u0688\u0627\u0644\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f <code>FLOAT<\/code>\u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u062a\u0642\u0633\u06cc\u0645 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0622\u06af\u06d2 \u0628\u0691\u06be\u06cc\u06ba:<\/p>\n<pre><code class=\"language-sql\">\nCAST(COUNT(reg_id) AS FLOAT) -- Numerator\n\n\/ -- Divide sign\n\n(SELECT COUNT(reg_id) FROM registration) -- Denominator\n\n* 100 -- Convert to percentage\n<\/code><\/pre>\n<p>\u0622\u0626\u06cc\u06d2 \u06cc\u06c1 \u0633\u0628 \u0627\u06cc\u06a9 \u0633\u0627\u062a\u06be \u0631\u06a9\u06be\u06cc\u06ba:<\/p>\n<pre><code class=\"language-sql\">SELECT\n    course_name,\n    CAST(COUNT(reg_id) AS FLOAT)\/\n    (SELECT \n        COUNT(reg_id) \n     FROM registration) * 100 AS percent_of_total\nFROM course AS l\nLEFT JOIN registration AS r\nON l.id = r.course_id\nGROUP BY course_name\n<\/code><\/pre>\n<p>\u0627\u06af\u0631 \u0622\u067e \u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0686\u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0622\u067e \u06a9\u0648 \u062f\u0631\u062c \u0630\u06cc\u0644 \u0646\u062a\u0627\u0626\u062c \u0645\u0644\u06cc\u06ba \u06af\u06d2:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_612_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u0627 \u0646\u0627\u0645 \u0627\u0648\u0631 \u0645\u062c\u0645\u0648\u0639\u06cc \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u0627 \u0641\u06cc\u0635\u062f \u062f\u06a9\u06be\u0627\u062a\u06cc \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"296\" height=\"210\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0646\u062a\u0627\u0626\u062c \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u0648 \u0627\u0646 \u06a9\u06d2 \u0645\u062c\u0645\u0648\u0639\u06cc \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06d2 \u0641\u06cc\u0635\u062f \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062f\u06a9\u06be\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06a9\u0633\u06cc \u0642\u062f\u0631 \u0645\u06cc\u06ba \u0627\u0639\u0634\u0627\u0631\u06cc\u06c1 \u0645\u0642\u0627\u0645\u0627\u062a \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u0648 \u06a9\u0646\u0679\u0631\u0648\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 <code>percent_of_total<\/code> \u06a9\u0627\u0644\u0645 SQL \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>ROUND()<\/code> \u06cc\u06c1 \u0641\u0646\u06a9\u0634\u0646 \u0627\u06cc\u06a9 \u0627\u0639\u0634\u0627\u0631\u06cc\u06c1 \u06a9\u06cc \u062c\u06af\u06c1 \u067e\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u062a\u0627\u0632\u06c1 \u062a\u0631\u06cc\u0646 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u062f\u06cc\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT\n    course_name,\n    ROUND(CAST(COUNT(reg_id) AS FLOAT)\/\n    (SELECT \n        COUNT(reg_id) \n     FROM registration) * 100,1) AS percent_of_total\nFROM course AS l\nLEFT JOIN registration AS r\nON l.id = r.course_id\nGROUP BY course_name\n<\/code><\/pre>\n<p>\u0646\u062a\u06cc\u062c\u06c1:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_53_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u0627 \u0646\u0627\u0645 \u0627\u0648\u0631 \u0645\u062c\u0645\u0648\u0639\u06cc \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u0627 \u0641\u06cc\u0635\u062f \u062f\u06a9\u06be\u0627\u062a\u06cc \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"269\" height=\"208\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0622\u062e\u0631 \u0645\u06cc\u06ba\u060c \u0622\u067e \u0645\u062c\u0645\u0648\u0639\u06cc \u0627\u0646\u062f\u0631\u0627\u062c \u0645\u06cc\u06ba \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06cc \u0634\u0631\u0627\u06a9\u062a \u062f\u06cc\u06a9\u06be \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h4 id=\"heading-2-subquery-as-a-derived-table\">2. \u0645\u0627\u062e\u0648\u0630 \u062c\u062f\u0648\u0644\u0648\u06ba \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a<\/h4>\n<p>\u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u0648\u0626\u06d2: <code>FROM<\/code> \u0634\u0642\u060c \u0627\u062e\u0630 \u06a9\u0631\u062f\u06c1 \u062c\u062f\u0648\u0644\u06d4 \u0627\u062e\u0630 \u06a9\u0631\u062f\u06c1 \u0679\u06cc\u0628\u0644 \u0627\u06cc\u06a9 \u0639\u0627\u0631\u0636\u06cc \u062c\u062f\u0648\u0644 \u06c1\u06d2 \u062c\u0648 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u0633\u06d2 \u0628\u0646\u0627\u0626\u06cc \u06af\u0626\u06cc \u06c1\u06d2\u06d4 \u0648\u06c1 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0645\u06cc\u06ba \u0645\u0633\u062a\u0642\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0645\u062d\u0641\u0648\u0638 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0686\u0644\u0646\u06d2 \u06a9\u06d2 \u0648\u0642\u062a \u06c1\u06cc \u0645\u0648\u062c\u0648\u062f \u0631\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631\u060c \u06c1\u0645 \u06a9\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0622\u067e \u0627\u06cc\u06a9 \u0633\u0648\u0627\u0644 \u0644\u06a9\u06be \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u0639\u0644\u0627\u0642\u06d2 \u06a9\u06d2 \u0644\u062d\u0627\u0638 \u0633\u06d2 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u062a\u0627\u06c1\u0645\u060c \u0627\u06af\u0631 \u0622\u067e \u0646\u06cc\u0686\u06d2 \u062f\u06cc\u06d2 \u06af\u0626\u06d2 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0627\u0633\u0679\u0648\u0688\u0646\u0679 \u0679\u06cc\u0628\u0644 \u0633\u06d2 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-sql\">SELECT * FROM student\n<\/code><\/pre>\n<p>\u0622\u067e \u0646\u06d2 \u067e\u0627\u06cc\u0627 \u06a9\u06c1 \u06cc\u06c1 \u0648\u06c1\u0627\u06ba \u0646\u06c1\u06cc\u06ba \u062a\u06be\u0627\u06d4 <code>region<\/code>\u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 <code>state<\/code> \u06af\u0631\u0645\u06cc:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_62_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u0645\u06cc\u0632 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u06a9\u0627\u0644\u0645\u0648\u06ba \u06a9\u0648 \u062f\u06a9\u06be\u0627\u062a\u06cc \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"634\" height=\"234\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0627\u0633 \u0645\u0633\u0626\u0644\u06d2 \u06a9\u0648 \u062d\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0622\u067e \u062f\u0631\u062c \u0630\u06cc\u0644 \u0627\u0642\u062f\u0627\u0631 \u06a9\u0648 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>state<\/code> \u06a9\u0627\u0644\u0645 \u062c\u0648 \u0627\u062e\u0630 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>region<\/code> \u0627\u06cc\u0633 \u06a9\u06cc\u0648 \u0627\u06cc\u0644 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u06a9\u0627\u0644\u0645 <code>CASE<\/code> \u0628\u06cc\u0627\u0646\u0627\u062a \u062c\u06cc\u0633\u06d2:<\/p>\n<pre><code class=\"language-sql\">SELECT\n    *, -- all columns of the student table\n CASE\n    WHEN location \n       IN('Abeokuta','Ibadan','Mokola','Iyana Ipaja','Lagos') \n    THEN 'West'\n\n    WHEN location \n       IN('Anambra','Owerri','Enugu','Port Harcourt') \n    THEN 'East'\n\n    WHEN location \n       IN('Abuja','Ilorin','Kaduna','Kano','Jos') \n    THEN 'North'\n END AS region -- a derived region column\nFROM student\n<\/code><\/pre>\n<p>\u062c\u0628 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u0639\u0645\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0630\u06cc\u0644 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u0648\u0627\u067e\u0633 \u0622 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_306_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u0646\u062a\u0627\u0626\u062c \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u0645\u06cc\u0632 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u06a9\u0627\u0644\u0645 \u062f\u06a9\u06be\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0628\u0634\u0645\u0648\u0644 CASE \u0633\u0679\u06cc\u0679\u0645\u0646\u0679 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u0631\u06cc\u062c\u0646 \u06a9\u0627\u0644\u0645\u06d4\" style=\"display:block;margin:0 auto\" width=\"686\" height=\"331\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0646\u062a\u0627\u0626\u062c \u0627\u0628 \u0627\u0633\u0679\u0648\u0688\u0646\u0679 \u0679\u06cc\u0628\u0644 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u06a9\u0627\u0644\u0645 \u062f\u06a9\u06be\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0628\u0634\u0645\u0648\u0644 \u0631\u06cc\u062c\u0646 \u06a9\u0627\u0644\u0645 \u062c\u0648 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2: <code>CASE<\/code> \u0646\u0627\u0645<\/p>\n<p>\u0627\u0628 \u062c\u0628 \u06a9\u06c1 \u06c1\u0645\u0627\u0631\u06d2 \u067e\u0627\u0633 \u0627\u06cc\u06a9 \u0645\u0642\u0627\u0645\u06cc \u06a9\u0627\u0644\u0645 \u06c1\u06d2\u060c \u0622\u0626\u06cc\u06d2 \u067e\u0648\u0631\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0679\u06cc\u0628\u0644 \u06a9\u06d2 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0633\u0628 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u067e\u0648\u0631\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0642\u0648\u0633\u06cc\u0646 \u0645\u06cc\u06ba \u0628\u0646\u062f \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0627\u06cc\u06a9 \u0639\u0631\u0641 \u062f\u06cc\u06ba:<\/p>\n<pre><code class=\"language-sql\">(SELECT\n    *, \n    CASE\n        WHEN location \n           IN('Abeokuta','Ibadan','Mokola','Iyana Ipaja','Lagos') \n        THEN 'West'\n\n        WHEN location \n           IN('Anambra','Owerri','Enugu','Port Harcourt') \n        THEN 'East'\n\n        WHEN location \n           IN('Abuja','Ilorin','Kaduna','Kano','Jos') \n        THEN 'North'\n    END AS region \nFROM student) AS data_prep -- aliased data_prep\n<\/code><\/pre>\n<p>\u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u0627 <code>data_prep<\/code>\u0628\u0631\u06cc\u06a9\u0679 \u0627\u0648\u0631 \u0639\u0631\u0641\u06cc \u0646\u0627\u0645\u0648\u06ba \u0633\u0645\u06cc\u062a \u0645\u06a9\u0645\u0644 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 <code>FROM<\/code> \u0634\u0642 \u0627\u06cc\u06a9 \u0628\u0627\u0642\u0627\u0639\u062f\u06c1 \u0645\u06cc\u0632 \u06a9\u06cc \u0637\u0631\u062d \u06c1\u06d2:<\/p>\n<pre><code class=\"language-sql\">FROM (SELECT\n    *, \n    CASE\n        WHEN location \n           IN('Abeokuta','Ibadan','Mokola','Iyana Ipaja','Lagos') \n        THEN 'West'\n\n        WHEN location \n           IN('Anambra','Owerri','Enugu','Port Harcourt') \n        THEN 'East'\n\n        WHEN location \n           IN('Abuja','Ilorin','Kaduna','Kano','Jos') \n        THEN 'North'\n    END AS region \nFROM student) AS data_prep\n<\/code><\/pre>\n<p>\u0627\u0633 \u0644\u0645\u062d\u06d2 \u0633\u06d2\u060c \u0622\u067e \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0622\u067e \u06a9\u0648\u0646 \u0633\u0627 \u0688\u06cc\u0679\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba: <code>data_prep<\/code>. \u06cc\u06c1 \u0627\u06cc\u06a9 \u0628\u0627\u0642\u0627\u0639\u062f\u06c1 \u0645\u06cc\u0632 \u06a9\u06cc \u0637\u0631\u062d \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0628 \u0622\u0626\u06cc\u06d2 \u062f\u0631\u062c \u0630\u06cc\u0644 \u0688\u06cc\u0679\u0627 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba: <code>data_prep<\/code> \u0639\u0644\u0627\u0642\u06d2 \u06a9\u06d2 \u0644\u062d\u0627\u0638 \u0633\u06d2 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u0627 \u062d\u0633\u0627\u0628 \u0644\u06af\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2:<\/p>\n<pre><code class=\"language-sql\">SELECT\n    region,\n    COUNT(id) AS students\nFROM (SELECT\n        *, \n        CASE\n          WHEN location \n            IN('Abeokuta','Ibadan','Mokola','Iyana Ipaja','Lagos') \n          THEN 'West'\n\n          WHEN location \n            IN('Anambra','Owerri','Enugu','Port Harcourt') \n          THEN 'East'\n\n          WHEN location \n            IN('Abuja','Ilorin','Kaduna','Kano','Jos') \n          THEN 'North'\n         END AS region \n        FROM student) AS data_prep \nGROUP BY region \n<\/code><\/pre>\n<p>\u062c\u0628 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u0639\u0645\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0630\u06cc\u0644 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u0648\u0627\u067e\u0633 \u0622 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_148_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u0646\u062a\u0627\u0626\u062c \u0639\u0644\u0627\u0642\u06d2 \u06a9\u06d2 \u0644\u062d\u0627\u0638 \u0633\u06d2 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4\" style=\"display:block;margin:0 auto\" width=\"157\" height=\"109\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0646\u062a\u0627\u0626\u062c \u0639\u0644\u0627\u0642\u06d2 \u06a9\u06d2 \u0644\u062d\u0627\u0638 \u0633\u06d2 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h4 id=\"heading-3-subquery-as-a-filter\">3. \u0641\u0644\u0679\u0631 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a<\/h4>\n<p>\u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u0648\u0626\u06d2: <code>WHERE<\/code> \u0634\u0642\u060c \u062c\u0648 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0641\u0644\u0679\u0631 \u06c1\u06d2\u06d4 \u0622\u067e\u0631\u06cc\u0679\u0631\u0632 \u06a9\u06d2 \u0645\u062e\u062a\u0644\u0641 \u06af\u0631\u0648\u067e\u0633 \u06c1\u06cc\u06ba \u062c\u0646 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u0648 \u0641\u0644\u0679\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><strong>\u0645\u0646\u0637\u0642\u06cc \u0622\u067e\u0631\u06cc\u0679\u0631\u0632<\/strong><\/p>\n<p>\u0627\u0646 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06c1\u06cc\u06ba: <code>IN<\/code>, <code>ANY<\/code>\u0627\u0648\u0631 <code>ALL<\/code>. \u062c\u0628 \u0627\u06cc\u06a9 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0642\u062f\u0631\u06cc\u06ba \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0622\u067e \u0627\u0633\u06d2 \u0627\u067e\u0646\u06d2 \u0688\u06cc\u0679\u0627\u0633\u06cc\u0679 \u0645\u06cc\u06ba \u06a9\u0627\u0644\u0645 \u06a9\u06cc \u0642\u062f\u0631\u0648\u06ba \u06a9\u0627 \u0645\u0648\u0627\u0632\u0646\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0644\u0648\u0679\u0627\u0626\u06cc \u06af\u0626\u06cc \u0627\u0642\u062f\u0627\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0645\u06cc\u06ba \u0646\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0645\u062b\u0627\u0644\u06cc\u06ba \u062f\u06cc\u06a9\u06be\u06cc \u06c1\u06cc\u06ba: <code>IN<\/code> \u0627\u0633 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0628\u0627\u0642\u06cc \u062f\u0648 \u06a9\u06cc \u0637\u0631\u0641 \u0686\u0644\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0645\u0646\u0638\u0631 \u0646\u0627\u0645\u06c1: \u0622\u067e \u0645\u0631\u062f \u0637\u0644\u0628\u0627\u0621 \u06a9\u06d2 \u0631\u06cc\u06a9\u0627\u0631\u0688\u0632 \u0628\u0627\u0632\u06cc\u0627\u0641\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u062e\u0648\u0627\u062a\u06cc\u0646 \u0637\u0644\u0628\u0627\u0621 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0639\u0645\u0631 \u06a9\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u0633 \u06a9\u0648 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0637\u0631\u06cc\u0642\u06c1 \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u06c1\u06d2\u06d4 <code>ANY<\/code>:<\/p>\n<pre><code class=\"language-sql\">SELECT \n\t*\nFROM student \nWHERE gender=\"Male\" \n      AND age > ANY (SELECT \n                       DISTINCT age \n                     FROM student \n                     WHERE gender=\"Female\")\n<\/code><\/pre>\n<p>\u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u062f\u0648 \u062d\u0635\u0648\u06ba \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2: \u0645\u06cc\u0646 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0627\u0648\u0631 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631\u06d4<\/p>\n<p>\u0627\u06c1\u0645 \u0633\u0648\u0627\u0644 \u06cc\u06c1 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-sql\">SELECT \n\t*\nFROM student \nWHERE gender=\"Male\" \n      AND age > ANY (...)\n<\/code><\/pre>\n<p>\u0627\u0648\u0631 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06cc\u06c1 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-sql\">SELECT \n    DISTINCT age \nFROM student \nWHERE gender=\"Female\"\n<\/code><\/pre>\n<p>\u0645\u06cc\u0646\u062c\u0645\u0646\u0679 \u0633\u0633\u0679\u0645 \u067e\u0631 \u0645\u06a9\u0645\u0644 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0686\u0644\u0627\u0646\u0627 \u0627\u0633 \u0637\u0631\u062d \u0646\u0638\u0631 \u0622\u0626\u06d2 \u06af\u0627:<\/p>\n<pre><code class=\"language-sql\">SELECT \n\t*\nFROM student \nWHERE gender=\"Male\" \n      AND age > ANY (SELECT \n                       DISTINCT age \n                     FROM student \n                     WHERE gender=\"Female\")\n<\/code><\/pre>\n<p>\u067e\u0631\u062f\u06d2 \u06a9\u06d2 \u067e\u06cc\u0686\u06be\u06d2\u060c \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u0627 \u067e\u06c1\u0644\u06d2 \u062c\u0627\u0626\u0632\u06c1 \u0644\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT \n   DISTINCT age \nFROM student \nWHERE gender=\"Female\"\n<\/code><\/pre>\n<p>\u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u0637\u0627\u0644\u0628 \u0639\u0644\u0645 \u06a9\u06cc \u0645\u06cc\u0632 \u0633\u06d2 \u0637\u0627\u0644\u0628 \u0639\u0644\u0645 \u06a9\u06cc \u0627\u0644\u06af \u0627\u0644\u06af \u0639\u0645\u0631\u06cc\u06ba \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_187_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 \u0637\u0627\u0644\u0628\u0627\u062a \u06a9\u06cc \u0639\u0645\u0631 \u06a9\u06cc \u062d\u062f \u0648\u0627\u0636\u062d \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"168\" height=\"181\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u0628\u06be\u06cc\u062c\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062c\u0633 \u06a9\u06d2 \u0646\u062a\u06cc\u062c\u06d2 \u0645\u06cc\u06ba \u0645\u06a9\u0645\u0644 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u062c\u06cc\u0633\u0627 \u06a9\u06c1 \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u062f\u06a9\u06be\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT \n\t*\nFROM student \nWHERE gender=\"Male\" \n      AND age > ANY (23, 25, 26, 27, 28, 29, 30)\n<\/code><\/pre>\n<p>\u0627\u0628 \u06c1\u0631 \u0644\u0691\u06a9\u06d2 \u06a9\u06cc \u0639\u0645\u0631 \u06a9\u0627 \u0645\u0648\u0627\u0632\u0646\u06c1 \u0644\u0691\u06a9\u06cc \u06a9\u06cc \u0639\u0645\u0631 \u0633\u06d2 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0635\u0631\u0641 \u0627\u0646 \u0644\u0691\u06a9\u0648\u06ba \u06a9\u0648 \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0644\u0691\u06a9\u06cc\u0648\u06ba \u06a9\u06cc \u0639\u0645\u0631\u0648\u06ba \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0645 \u0627\u0632 \u06a9\u0645 \u0627\u06cc\u06a9 \u0633\u06d2 \u0628\u0691\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_232_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u0646\u062a\u0627\u0626\u062c \u0627\u0646 \u0644\u0691\u06a9\u0648\u06ba \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u062f\u06a9\u06be\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0646 \u06a9\u06cc \u0639\u0645\u0631 \u06a9\u0645 \u0627\u0632 \u06a9\u0645 \u0627\u06cc\u06a9 \u0644\u0691\u06a9\u06cc \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"617\" height=\"194\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0646\u062a\u0627\u0626\u062c \u0627\u0646 \u0644\u0691\u06a9\u0648\u06ba \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u062f\u06a9\u06be\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0646 \u06a9\u06cc \u0639\u0645\u0631 \u06a9\u0645 \u0627\u0632 \u06a9\u0645 \u0627\u06cc\u06a9 \u0644\u0691\u06a9\u06cc \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0630\u06a9\u0648\u0631\u06c1 \u0633\u0648\u0627\u0644 \u0645\u06cc\u06ba <code>ANY<\/code> \u0622\u067e\u0631\u06cc\u0679\u0631 \u06a9\u0648 \u0627\u0633 \u0628\u0627\u062a \u06a9\u0648 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2 \u06a9\u06c1 \u0644\u0691\u06a9\u0627 \u0637\u0627\u0644\u0628 \u0639\u0644\u0645 \u06a9\u0645 \u0627\u0632 \u06a9\u0645 \u0627\u06cc\u06a9 \u0637\u0627\u0644\u0628 \u0639\u0644\u0645 \u0633\u06d2 \u0628\u0691\u0627 \u06c1\u06d2 \u062a\u0627\u06a9\u06c1 \u0627\u0633 \u06a9\u06d2 \u0631\u06cc\u06a9\u0627\u0631\u0688\u0632 \u06a9\u0648 \u0688\u06cc\u0641\u0627\u0644\u0679 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0648\u0627\u067e\u0633 \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2\u06d4<\/p>\n<p>\u06a9\u06d2 \u0633\u0627\u062a\u06be <code>ALL<\/code>\u0686\u06cc\u0632\u06cc\u06ba \u062a\u06be\u0648\u0691\u06cc \u0645\u062e\u062a\u0644\u0641 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u0644\u0691\u06a9\u0648\u06ba \u06a9\u06cc \u0639\u0645\u0631 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u0648\u0646\u06cc \u0686\u0627\u06c1\u06cc\u06d2\u06d4 <strong>\u06c1\u0631<\/strong> \u0644\u0691\u06a9\u06cc\u0648\u06ba \u0646\u06d2 \u0627\u0633 \u06a9\u0627 \u0631\u06cc\u06a9\u0627\u0631\u0688 \u0648\u0627\u067e\u0633 \u0645\u0627\u0646\u06af\u0627\u06d4 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0627\u06cc\u06a9 \u0645\u062b\u0627\u0644 \u0633\u0648\u0627\u0644 \u062f\u06cc\u06a9\u06be\u06cc\u06ba: <code>ALL<\/code> \u0630\u06cc\u0644 \u0645\u06cc\u06ba:<\/p>\n<pre><code class=\"language-sql\">SELECT \n\t*\nFROM student \nWHERE gender=\"Male\" \n      AND age > ALL (SELECT \n                       DISTINCT age \n                     FROM student \n                     WHERE gender=\"Female\")\n<\/code><\/pre>\n<p>\u0646\u062a\u06cc\u062c\u06c1:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_585_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0648\u0627\u062d\u062f \u0645\u0631\u062f \u0637\u0627\u0644\u0628 \u0639\u0644\u0645 \u0648\u0627\u067e\u0633 \u0622\u06cc\u0627 \u062c\u0648 \u062a\u0645\u0627\u0645 \u0637\u0627\u0644\u0628\u0627\u062a \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0639\u0645\u0631 \u06a9\u0627 \u062a\u06be\u0627\u06d4\" style=\"display:block;margin:0 auto\" width=\"595\" height=\"75\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0648\u0627\u062d\u062f \u0645\u0631\u062f \u0637\u0627\u0644\u0628 \u0639\u0644\u0645 \u0648\u0627\u067e\u0633 \u0622\u06cc\u0627 \u062c\u0648 \u062a\u0645\u0627\u0645 \u0637\u0627\u0644\u0628\u0627\u062a \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0639\u0645\u0631 \u06a9\u0627 \u062a\u06be\u0627\u06d4<\/p>\n<p><strong>\u0645\u0648\u0627\u0632\u0646\u06c1 \u0622\u067e\u0631\u06cc\u0679\u0631<\/strong><\/p>\n<p>\u0627\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0627\u06cc\u06a9 \u06a9\u0627\u0644\u0645 \u06a9\u06cc \u0642\u062f\u0631 \u06a9\u0627 \u0645\u0648\u0627\u0632\u0646\u06c1 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0627\u06cc\u06a9 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0648\u0627\u067e\u0633 \u06a9\u06cc \u06af\u0626\u06cc \u0627\u06cc\u06a9 \u0627\u0633\u06a9\u06cc\u0644\u0631 \u0642\u062f\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0646 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06c1\u06cc\u06ba:<\/p>\n<ol>\n<li>\n<p>\u062c\u06cc\u0633\u0627 \u06a9\u06c1 (==)<\/p>\n<\/li>\n<li>\n<p>(>) \u0633\u06d2 \u0628\u0691\u0627<\/p>\n<\/li>\n<li>\n<p>(>=) \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1<\/p>\n<\/li>\n<li>\n<p>(<) \u0633\u06d2 \u06a9\u0645<\/p>\n<\/li>\n<li>\n<p>(=<) \u0633\u06d2 \u06a9\u0645 \u06cc\u0627 \u0627\u0633 \u06a9\u06d2 \u0628\u0631\u0627\u0628\u0631<\/p>\n<\/li>\n<li>\n<p>(<> \u06cc\u0627 !=) \u06a9\u06d2 \u0628\u0631\u0627\u0628\u0631 \u0646\u06c1\u06cc\u06ba<\/p>\n<\/li>\n<\/ol>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631\u060c \u06c1\u0645 \u06a9\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0622\u067e \u0627\u0646 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u0628\u0627\u0632\u06cc\u0627\u0641\u062a \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u062a\u0645\u0627\u0645 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u0627\u0648\u0633\u0637 \u0639\u0645\u0631 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u06cc\u06ba\u06d4 \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u062f\u06cc\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT *\nFROM student\nWHERE age > (SELECT AVG(age) FROM student)\n<\/code><\/pre>\n<p>\u062c\u0628 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u06cc\u06c1 \u0627\u0646 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u062a\u0645\u0627\u0645 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u0627\u0648\u0633\u0637 \u0639\u0645\u0631 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_24_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u0627\u0646 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06d2 \u0631\u06cc\u06a9\u0627\u0631\u0688 \u062f\u06a9\u06be\u0627\u062a\u06cc \u06c1\u06d2 \u062c\u0648 \u062a\u0645\u0627\u0645 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u0627\u0648\u0633\u0637 \u0639\u0645\u0631 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u06cc\u06ba\u06d4\" style=\"display:block;margin:0 auto\" width=\"629\" height=\"309\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0622\u0626\u06cc\u06d2 \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u06d2 \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u06a9\u06d2 \u062d\u06a9\u0645 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0628\u0627\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u062c\u0628 \u0622\u067e \u0645\u06a9\u0645\u0644 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u06c1\u0644\u06d2 \u0686\u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0633\u0628 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u067e\u0633 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u0627 \u062c\u0627\u0626\u0632\u06c1 \u0644\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT AVG(age) FROM student\n<\/code><\/pre>\n<p>\u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u0627\u06cc\u06a9 \u0648\u0627\u062d\u062f \u0642\u062f\u0631\u060c 25 \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062c\u0648 \u06a9\u06c1 \u062a\u0645\u0627\u0645 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u0627\u0648\u0633\u0637 \u0639\u0645\u0631 \u06c1\u06d2\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_466_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u062a\u0645\u0627\u0645 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06cc \u0627\u0648\u0633\u0637 \u0639\u0645\u0631 \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"152\" height=\"50\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0627\u06af\u0631 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 25 \u06a9\u06cc \u0642\u062f\u0631 \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0637\u0648\u0631 \u067e\u0631 \u067e\u0648\u0631\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0630\u06cc\u0644 \u06a9\u06cc \u0637\u0631\u062d \u0646\u0638\u0631 \u0622\u0626\u06d2 \u06af\u06cc:<\/p>\n<pre><code class=\"language-sql\">SELECT * FROM student WHERE age > 25\n<\/code><\/pre>\n<p>\u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u0679\u0648\u0688\u0646\u0679 \u0679\u06cc\u0628\u0644 \u0645\u06cc\u06ba \u06c1\u0631 \u0637\u0627\u0644\u0628 \u0639\u0644\u0645 \u06a9\u06cc \u0639\u0645\u0631 \u06a9\u0627 \u0645\u0648\u0627\u0632\u0646\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0648\u0627\u067e\u0633 \u06a9\u06cc\u06d2 \u06af\u0626\u06d2 25 \u0633\u06d2 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u06a9\u0633\u06cc \u0637\u0627\u0644\u0628 \u0639\u0644\u0645 \u06a9\u06cc \u0639\u0645\u0631 25 \u0633\u0627\u0644 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u06d2 \u062a\u0648 \u0627\u0646 \u06a9\u06d2 \u0631\u06cc\u06a9\u0627\u0631\u0688 \u06a9\u0648 \u0646\u062a\u0627\u0626\u062c \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4 \u0648\u0631\u0646\u06c1 \u0646\u0638\u0631 \u0627\u0646\u062f\u0627\u0632 \u06a9\u0631 \u062f\u06cc\u0627 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<p>\u0630\u06cc\u0644 \u0645\u06cc\u06ba \u0627\u06c1\u0645 \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u062f\u06cc\u06a9\u06be\u06cc\u06ba\u06d4 \u0639\u0645\u0631 \u06a9\u06d2 \u06a9\u0627\u0644\u0645 \u0645\u06cc\u06ba \u062a\u0645\u0627\u0645 \u0627\u0642\u062f\u0627\u0631 25 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_105_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u0627\u0648\u0633\u0637 \u0639\u0645\u0631 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0639\u0645\u0631 \u06a9\u06d2 \u0637\u0644\u0628\u0627\u0621 \u06a9\u06d2 \u0631\u06cc\u06a9\u0627\u0631\u0688 \u062f\u06a9\u06be\u0627\u062a\u06cc \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"629\" height=\"309\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0622\u067e \u0645\u0648\u0627\u0632\u0646\u06c1 \u0622\u067e\u0631\u06cc\u0679\u0631\u0632 \u06a9\u0648 \u0628\u06be\u06cc \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0633 \u067e\u0631 \u0645\u0646\u062d\u0635\u0631 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u06a9\u06cc\u0627 \u062f\u06cc\u06a9\u06be\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0645\u062e\u062a\u0644\u0641 \u0645\u0648\u0627\u0632\u0646\u06c1 \u0622\u067e\u0631\u06cc\u0679\u0631\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06d2 \u06a9\u0686\u06be \u0645\u0639\u0627\u0645\u0644\u0627\u062a \u06cc\u06c1 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-sql\">-- retrieve students whose age is greater or equal to the average age of all students\n\nSELECT *\nFROM student\nWHERE age >= (SELECT AVG (age) FROM student)\n\n-- retrieve students whose age is less than the average age of all students\n\nSELECT *\nFROM student\nWHERE age < (SELECT AVG (age) FROM student)\n\n-- retrieve students whose age is less than or equal the average age of all students\n\nSELECT *\nFROM student\nWHERE age =< (SELECT AVG (age) FROM student)\n\n-- retrieve students whose age is equal to the average age of all students\n\nSELECT *\nFROM student\nWHERE age = (SELECT AVG (age) FROM student)\n\n-- retrieve student whose age is not equal to the average age of all students\n\nSELECT *\nFROM student\nWHERE age <> (SELECT AVG (age) FROM student)\n\n--Alternatively, you can also use !=, which stands for not equal to\n\nSELECT *\nFROM student\nWHERE age != (SELECT AVG (age) FROM student)\n<\/code><\/pre>\n<h3 id=\"heading-correlated-subqueries\">\u0645\u062a\u0639\u0644\u0642\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631<\/h3>\n<p>\u0627\u0633 \u0642\u0633\u0645 \u06a9\u06cc \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0627\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06cc \u0627\u0642\u062f\u0627\u0631 \u067e\u0631 \u0645\u0646\u062d\u0635\u0631 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0627\u0633\u06d2 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0628\u0627\u06c1\u0631 \u0686\u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u06cc\u06c1 \u06a9\u0627\u0645 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631\u060c \u0641\u0631\u0636 \u06a9\u0631\u06cc\u06ba \u06a9\u06c1 \u0622\u067e \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u0627 \u062d\u0633\u0627\u0628 \u0644\u06af\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u0645\u062a\u0639\u0644\u0642\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0633\u0628 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u0622\u0626\u06cc\u06d2 \u0627\u06cc\u06a9 \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba \u062c\u0633 \u0645\u06cc\u06ba \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u06a9\u0644 \u062a\u0639\u062f\u0627\u062f \u06a9\u0648 \u0648\u0627\u067e\u0633 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0627\u0644\u0645 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u063a\u06cc\u0631 \u0645\u062a\u0639\u0644\u0642\u06c1 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u0634\u0627\u0645\u0644 \u06c1\u0648\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT \n\tcourse_name,\n\t(SELECT COUNT(reg_id) FROM registration) AS regs --subquery\nFROM course \n<\/code><\/pre>\n<p>\u062c\u0628 \u0639\u0645\u0644 \u0645\u06cc\u06ba \u0644\u0627\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u0627 \u0646\u0627\u0645 \u0627\u0633 \u0633\u06d2 \u0628\u0627\u0632\u06cc\u0627\u0641\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2: <code>course<\/code> \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u0679\u06cc\u0628\u0644 \u0645\u06cc\u06ba \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06a9\u06cc \u06a9\u0644 \u062a\u0639\u062f\u0627\u062f \u06a9\u0648 \u0634\u0645\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>registration<\/code> \u0645\u06cc\u0632 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u0627\u062e\u0630 \u06a9\u0631\u062f\u06c1 \u06a9\u0627\u0644\u0645 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0648\u0627\u067e\u0633 \u06a9\u06cc\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 <code>course_name<\/code>. \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u0646\u062a\u0627\u0626\u062c \u062f\u06cc\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_428_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u0627 \u0646\u0627\u0645 \u0627\u0648\u0631 \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u06a9\u0644 \u062a\u0639\u062f\u0627\u062f \u062f\u06a9\u06be\u0627\u062a\u06cc \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"203\" height=\"178\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u062a\u0627\u06c1\u0645\u060c \u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u0646\u062a\u06cc\u062c\u06c1 \u0648\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u062c\u0633 \u06a9\u06cc \u06c1\u0645\u06cc\u06ba \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 \u06c1\u0645 \u0627\u0635\u0644 \u0645\u06cc\u06ba \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06a9\u06cc \u06a9\u0644 \u062a\u0639\u062f\u0627\u062f \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0627\u0633 \u06a9\u06d2 \u0622\u06af\u06d2 \u062f\u06a9\u06be\u0627\u0626\u06cc \u062c\u0627\u0626\u06d2\u06d4<\/p>\n<p>\u0627\u0633 \u0645\u0633\u0626\u0644\u06d2 \u06a9\u0648 \u062d\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u06c1\u0645 \u0627\u0628\u062a\u062f\u0627\u0626\u06cc \u063a\u06cc\u0631 \u0645\u062a\u0639\u0644\u0642\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba \u0645\u0648\u062c\u0648\u062f \u0627\u0642\u062f\u0627\u0631 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f \u067e\u0631 \u0641\u0644\u0679\u0631 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631 \u06a9\u06d2 \u0627\u0633\u06d2 \u0627\u06cc\u06a9 \u0645\u0631\u0628\u0648\u0637 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631 \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u063a\u06cc\u0631 \u0645\u062a\u0639\u0644\u0642\u06c1 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u06cc\u06c1\u0627\u06ba \u062f\u06cc\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">(SELECT COUNT(reg_id) FROM registration) AS regs\n<\/code><\/pre>\n<p>\u0645\u062a\u0639\u0644\u0642\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u0630\u06a9\u0648\u0631\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0627\u067e \u0688\u06cc\u0679 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2:<\/p>\n<p>\u0633\u0628 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u0627\u0633 \u067e\u0648\u0631\u06d2 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u06a9\u0627\u067e\u06cc \u06a9\u0631\u06cc\u06ba \u062c\u0648 \u06c1\u0645 \u0646\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u062a\u06be\u0627 \u0627\u0648\u0631 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0627\u0648\u0631 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u0645\u06cc\u06ba \u0679\u06cc\u0628\u0644\u0632 \u06a9\u0648 \u0639\u0631\u0641\u06cc \u0646\u0627\u0645 \u062a\u0641\u0648\u06cc\u0636 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">-- Alias the course table l and registrations as r\nSELECT \n\tcourse_name,\n\t(SELECT COUNT(reg_id) FROM registration AS r) AS regs \nFROM course AS l\n<\/code><\/pre>\n<p>\u0627\u06af\u0644\u0627\u060c \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba \u0645\u0648\u062c\u0648\u062f \u0679\u06cc\u0628\u0644\u0632 \u06a9\u0648 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba \u0645\u0648\u062c\u0648\u062f \u062c\u062f\u0648\u0644\u0648\u06ba \u0633\u06d2 \u06cc\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0644\u0646\u06a9 \u06a9\u0631\u06cc\u06ba: <code>id<\/code> \u06a9\u0648\u0631\u0633 \u0679\u06cc\u0628\u0644 \u0645\u06cc\u06ba \u06a9\u0627\u0644\u0645 <code>course_id<\/code> \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0679\u06cc\u0628\u0644 \u0645\u06cc\u06ba \u06a9\u0627\u0644\u0645 \u06cc\u06c1 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-sql\">SELECT \n    COUNT(reg_id) \nFROM registration AS r \nWHERE r.course_id = l.id -- the connection\n<\/code><\/pre>\n<p>\u0627\u0628 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0627\u06cc\u06a9 \u0645\u062a\u0639\u0644\u0642\u06c1 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0627\u0633\u06d2 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0627\u0644\u06af \u0686\u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0622\u067e \u06a9\u0648 \u0630\u06cc\u0644 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u0645\u0644\u06cc\u06ba \u06af\u06d2:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_861_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u0627\u0633 \u0648\u0642\u062a \u063a\u0644\u0637\u06cc \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06d2 \u062c\u0628 \u0627\u06cc\u06a9 \u0645\u062a\u0639\u0644\u0642\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0628\u0627\u06c1\u0631 \u0627\u0646\u062c\u0627\u0645 \u062f\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"433\" height=\"109\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u06cc\u06c1 \u063a\u0644\u0637\u06cc \u0633\u0627\u062f\u06c1 \u0633\u06cc \u06c1\u06d2\u06d4 <code>l.id<\/code> \u067e\u0631 <code>WHERE<\/code> \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba \u0634\u0642\u0648\u06ba \u06a9\u0648 \u062a\u0633\u0644\u06cc\u0645 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0648\u06c1 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0633\u06d2 \u0622\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u0633 \u06a9\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u06d2 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba \u06a9\u0627\u0644\u0645 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0646\u06cc\u0633\u0679 \u06a9\u06cc\u0627 \u062c\u0627\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u0645\u06a9\u0645\u0644 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u062f\u06cc\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT \n    course_name,\n    (SELECT \n        COUNT(reg_id) \n     FROM registration AS r\n     WHERE r.course_id = l.id) AS regs -- correlated subquery\nFROM course AS l\n<\/code><\/pre>\n<p>\u062c\u0628 \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0630\u06cc\u0644 \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u0648\u0627\u067e\u0633 \u0622 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_53_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.jpg\" alt=\"\u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0646\u0627\u0645 \u0627\u0648\u0631 \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4\" style=\"display:block;margin:0 auto\" width=\"195\" height=\"176\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u0646\u062a\u0627\u0626\u062c \u06c1\u0631 \u0645\u0636\u0645\u0648\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0636\u0627\u0645\u06cc\u0646 \u06a9\u06d2 \u0646\u0627\u0645 \u0627\u0648\u0631 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u0628 \u0622\u0626\u06cc\u06d2 \u0627\u0633\u062a\u0641\u0633\u0627\u0631\u0627\u062a \u06a9\u06d2 \u0646\u0641\u0627\u0630 \u06a9\u06d2 \u062d\u06a9\u0645 \u06a9\u0648 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u062c\u0628 \u067e\u0648\u0631\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u067e\u06c1\u0644\u06d2 \u067e\u0633 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0645\u0631\u06a9\u0632\u06cc \u0633\u0648\u0627\u0644 \u06a9\u0627 \u062c\u0627\u0626\u0632\u06c1 \u0644\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT \n    course_name \nFROM course AS l\n<\/code><\/pre>\n<p>\u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0637\u06d2 \u0634\u062f\u06c1 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0635\u0631\u0641 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u0686\u0644\u0627\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0646\u0627\u0645 \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u06cc\u06c1 \u0627\u06cc\u06a9 \u0648\u0642\u062a \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0646\u0627\u0645 \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u0632\u06cc\u062f \u0628\u0631\u0622\u06ba\u060c \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0648\u0627\u067e\u0633 \u06a9\u06cc\u06d2 \u06af\u0626\u06d2 \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0646\u0627\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0627\u0633 \u0645\u062e\u0635\u0648\u0635 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631\u060c \u0645\u06a9\u0645\u0644 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u067e\u06c1\u0644\u06d2 \u062a\u06a9\u0631\u0627\u0631 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646\u060c \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06c1 \u0648\u0627\u067e\u0633 \u06a9\u0631\u062f\u06c1 \u067e\u06c1\u0644\u0627 \u06a9\u0648\u0631\u0633 \u06a9\u0627 \u0646\u0627\u0645 \u0688\u06cc\u0679\u0627 \u062a\u062c\u0632\u06cc\u06c1 \u062a\u06be\u0627\u060c \u0627\u0648\u0631 \u0627\u0633 \u06a9\u06cc ID \u06cc\u06c1 \u06c1\u06d2: <code>CS01<\/code>. \u067e\u06be\u0631 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0633\u0648\u0627\u0644 \u062f\u06cc\u062a\u0627 \u06c1\u06d2: <code>CS01<\/code> \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u0648 \u0646\u06cc\u0686\u06d2 \u06a9\u06d2 \u0645\u0646\u0638\u0631 \u06a9\u06cc \u0637\u0631\u062d \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT \n    COUNT(reg_id) \nFROM registration AS r\nWHERE r.course_id = CS01 -- ID for data analytics\n<\/code><\/pre>\n<p>\u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0635\u0631\u0641 \u0627\u0646 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646\u0648\u06ba \u06a9\u0648 \u0634\u0645\u0627\u0631 \u06a9\u0631\u06d2 \u06af\u0627 \u062c\u0646 \u06a9\u0627 course_id \u0645\u0631\u06a9\u0632\u06cc \u0633\u0648\u0627\u0644 \u0645\u06cc\u06ba \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062f\u06c1 \u0642\u062f\u0631 \u0633\u06d2 \u0645\u06cc\u0644 \u06a9\u06be\u0627\u062a\u0627 \u06c1\u06d2 (\u0627\u0633 \u0645\u0639\u0627\u0645\u0644\u06d2 \u0645\u06cc\u06ba CS01)\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u0639\u062f \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0646\u0627\u0645 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0648\u0627\u067e\u0633 \u06a9\u0631\u062f\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06af\u0644\u06cc \u062a\u06a9\u0631\u0627\u0631 \u0645\u06cc\u06ba<\/p>\n<ul>\n<li>\n<p>\u0628\u0646\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u0627 \u0646\u0627\u0645 \u0628\u0627\u0632\u06cc\u0627\u0641\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u0648 \u0648\u0627\u067e\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>ID<\/code> \u0627\u06cc\u06a9 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p>\u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u0627\u0633 \u0645\u062e\u0635\u0648\u0635 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u0648 \u0634\u0645\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p>\u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0646\u0627\u0645 \u06a9\u06d2 \u0622\u06af\u06d2 \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<\/ul>\n<p>\u06cc\u06c1 \u0639\u0645\u0644 \u0627\u0633 \u0648\u0642\u062a \u062a\u06a9 \u062c\u0627\u0631\u06cc \u0631\u06c1\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u062a\u06a9 \u06a9\u06c1 \u062a\u0645\u0627\u0645 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0679\u06cc\u0628\u0644\u0632 \u067e\u0631 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u0648 \u062c\u0627\u062a\u06cc\u06d4 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0637\u0648\u0631 \u067e\u0631\u060c \u0679\u06cc\u0628\u0644 \u0645\u06cc\u06ba \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u0627\u0633 \u0628\u0627\u062a \u06a9\u0627 \u062a\u0639\u06cc\u0646 \u06a9\u0631\u062a\u06cc \u06c1\u06d2 \u06a9\u06c1 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u062a\u0646\u06cc \u062a\u06a9\u0631\u0627\u0631 \u06a9\u0631\u06d2 \u06af\u0627\u06d4<\/p>\n<p>\u0630\u06cc\u0644 \u0645\u06cc\u06ba \u062d\u062a\u0645\u06cc \u0646\u062a\u0627\u0626\u062c \u062f\u06cc\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.png\" alt=\"\u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0646\u0627\u0645 \u0627\u0648\u0631 \u06c1\u0631 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4\" style=\"display:block;margin:0 auto\" width=\"212\" height=\"182\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u062d\u062a\u0645\u06cc \u0646\u062a\u06cc\u062c\u06c1 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0646\u0627\u0645 \u062f\u06a9\u06be\u0627\u0626\u06d2 \u06af\u0627\u06d4 \u0648\u06c1 \u06a9\u0648\u0631\u0633\u0632 \u062c\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0628\u06be\u06cc \u062a\u06a9 \u06a9\u0648\u0626\u06cc \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 0 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u062f\u06a9\u06be\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<h4 id=\"heading-the-exists-operator\">\u0622\u067e\u0631\u06cc\u0679\u0631 \u0645\u0648\u062c\u0648\u062f \u06c1\u06d2\u06d4<\/h4>\n<p><code>EXISTS<\/code>    \u0686\u06cc\u06a9 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0622\u06cc\u0627 \u0645\u062a\u0639\u0644\u0642\u06c1 \u0679\u06cc\u0628\u0644 \u0645\u06cc\u06ba \u0645\u0645\u0627\u062b\u0644 \u0642\u0637\u0627\u0631 \u0645\u0648\u062c\u0648\u062f \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>TRUE<\/code> \u062c\u0628 \u06a9\u0648\u0626\u06cc \u0645\u0644 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>FALSE<\/code> \u0627\u06af\u0631 \u06a9\u0686\u06be \u0646\u06c1 \u0645\u0644\u06d2\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631\u060c \u0627\u06cc\u0633\u06d2 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u06cc \u0646\u0634\u0627\u0646\u062f\u06c1\u06cc \u06a9\u0631\u0646\u0627 \u062c\u0646 \u0645\u06cc\u06ba \u06a9\u0645 \u0627\u0632 \u06a9\u0645 \u0627\u0646\u062f\u0631\u0627\u062c \u06c1\u06d2:<\/p>\n<pre><code class=\"language-sql\">SELECT \n    course_name\nFROM course AS l\nWHERE EXISTS (SELECT 1\n              FROM registration AS r\n              WHERE r.course_id = l.id)\n<\/code><\/pre>\n<p>\u0645\u0646\u062f\u0631\u062c\u06c1 \u0628\u0627\u0644\u0627 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0627\u06cc\u06a9 \u0627\u06c1\u0645 \u0633\u0648\u0627\u0644 \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0645\u062a\u0639\u0644\u0642\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06c1\u0645 \u0633\u0648\u0627\u0644 \u06cc\u06c1 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-sql\">SELECT \n    course_name\nFROM course AS l\nWHERE EXISTS (...)\n<\/code><\/pre>\n<p>\u0627\u0648\u067e\u0631 \u062f\u06cc\u06d2 \u06af\u0626\u06d2 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0633\u0648\u0627\u0644 \u0645\u06cc\u06ba\u060c \u06a9\u0648\u0626\u06cc \u0633\u0627\u0628\u0642\u06c1 \u200b\u200b\u06a9\u0627\u0644\u0645 \u06a9\u0627 \u0646\u0627\u0645 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 <code>EXISTS<\/code> \u0622\u067e\u0631\u06cc\u0679\u0631 \u06cc\u06c1 \u06c1\u06d2 <code>EXISTS<\/code> \u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u06a9\u0627\u0644\u0645\u0648\u06ba \u0645\u06cc\u06ba \u0645\u0648\u062c\u0648\u062f \u0627\u0642\u062f\u0627\u0631 \u06a9\u0627 \u0645\u0648\u0627\u0632\u0646\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06c1 \u0648\u0627\u067e\u0633 \u06a9\u06cc \u06af\u0626\u06cc \u0627\u0642\u062f\u0627\u0631 \u0633\u06d2 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c <code>EXISTS<\/code> \u0686\u06cc\u06a9 \u06a9\u0631\u06cc\u06ba \u06a9\u06c1 \u0622\u06cc\u0627 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u0645 \u0627\u0632 \u06a9\u0645 \u0627\u06cc\u06a9 \u0642\u0637\u0627\u0631 \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u0627 \u0627\u0646\u062f\u0627\u0632\u06c1 \u0627\u0633 \u0637\u0631\u062d \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2: <code>TRUE<\/code> \u062c\u0628 \u0627\u06cc\u06a9 \u0635\u0641 \u0645\u0644 \u062c\u0627\u0626\u06d2\u06d4 <code>FALSE<\/code> \u0627\u06af\u0631 \u0642\u0637\u0627\u0631 \u0646\u06c1\u06cc\u06ba \u0645\u0644\u062a\u06cc \u06c1\u06d2:<\/p>\n<pre><code class=\"language-sql\">SELECT 1\nFROM registration AS r\nWHERE r.course_id = l.id\n<\/code><\/pre>\n<p>\u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u0627 \u06a9\u0631\u062f\u0627\u0631 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0679\u06cc\u0628\u0644 \u06a9\u0648 \u0686\u06cc\u06a9 \u06a9\u0631\u0646\u0627 \u06c1\u06d2\u06d4 <code>ID<\/code> \u0645\u0631\u06a9\u0632\u06cc \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06c1 \u0627\u06cc\u06a9 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u06cc \u06af\u0626\u06cc \u06c1\u06d2\u06d4 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0645\u06cc\u06ba SELECT \u06a9\u0627 \u0628\u06cc\u0627\u0646 \u06a9\u0648\u0626\u06cc \u06a9\u0627\u0644\u0645 \u062f\u0631\u062c \u0646\u06c1\u06cc\u06ba \u062f\u06a9\u06be\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0635\u0631\u0641 \u067e\u0644\u06cc\u0633 \u06c1\u0648\u0644\u0688\u0631 1\u06d4 \u06cc\u06c1 \u0627\u0633 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0644\u0648\u0679\u0627\u0626\u06cc \u06af\u0626\u06cc \u0627\u0635\u0644 \u0642\u06cc\u0645\u062a \u063a\u06cc\u0631 \u0645\u062a\u0639\u0644\u0642\u06c1 \u06c1\u06d2\u06d4 \u0627\u06c1\u0645 \u0628\u0627\u062a \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0622\u06cc\u0627 \u0635\u0641 \u0645\u0648\u062c\u0648\u062f \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0628 \u062c\u0628 \u06a9\u06c1 \u06c1\u0645 \u0646\u06d2 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0688\u06be\u0627\u0646\u0686\u06d2 \u067e\u0631 \u0628\u0627\u062a \u06a9\u06cc \u06c1\u06d2\u060c \u0622\u0626\u06cc\u06d2 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0639\u0645\u0644 \u06a9\u0648 \u06a9\u06cc\u0633\u06d2 \u0633\u0645\u062c\u06be\u0646\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0622\u0626\u06cc\u06d2 \u067e\u0648\u0631\u06d2 \u0633\u0648\u0627\u0644 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT \n    course_name\nFROM course AS l\nWHERE EXISTS (SELECT 1\n              FROM registration AS r\n              WHERE r.course_id = l.id)\n<\/code><\/pre>\n<p>\u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062c\u0628 \u0627\u0648\u067e\u0631 \u062f\u06cc \u06af\u0626\u06cc \u067e\u0648\u0631\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627\u060c \u062a\u0648 \u062c\u0627\u0626\u0632\u06c1 \u067e\u0633 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0634\u0631\u0648\u0639 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4 <code>FROM<\/code> \u0645\u06cc\u06ba:<\/p>\n<pre><code class=\"language-sql\">FROM course AS l\n<\/code><\/pre>\n<p>\u067e\u06be\u0631 \u06a9\u0648\u0631\u0633 \u0679\u06cc\u0628\u0644 \u06a9\u06cc \u067e\u06c1\u0644\u06cc \u0642\u0637\u0627\u0631 \u067e\u0631 \u063a\u0648\u0631 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 <code>EXISTS<\/code> \u0686\u06cc\u06a9 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0622\u06cc\u0627 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u0645\u06cc\u06ba \u0645\u0645\u0627\u062b\u0644 \u0642\u0637\u0627\u0631\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">WHERE EXISTS (SELECT 1\n              FROM registration AS r\n              WHERE r.course_id = l.id)\n<\/code><\/pre>\n<p>\u0627\u0628 \u0641\u0631\u0636 \u06a9\u0631\u06cc\u06ba \u06a9\u06c1 \u06a9\u0648\u0631\u0633 \u0679\u06cc\u0628\u0644 \u0645\u06cc\u06ba \u0632\u06cc\u0631 \u063a\u0648\u0631 \u067e\u06c1\u0644\u06cc \u0642\u0637\u0627\u0631 \u0688\u06cc\u0679\u0627 \u06a9\u06d2 \u062a\u062c\u0632\u06cc\u06c1 \u0627\u0648\u0631 \u0627\u0633 \u0642\u0637\u0627\u0631 \u0633\u06d2 \u06c1\u06d2\u06d4 <code>ID<\/code> \u06c1\u06d2 <code>CS01<\/code>. \u06cc\u06c1 <code>ID<\/code> \u0627\u0633\u06d2 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u067e\u0627\u0633 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0646\u06cc\u0686\u06d2 \u06a9\u06cc \u0637\u0631\u062d \u0646\u0638\u0631 \u0622\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-sql\">SELECT 1\nFROM registration AS r\nWHERE r.course_id = CS01 --- ID for data analytics\n<\/code><\/pre>\n<p>\u0642\u062f\u0631 <code>CS01<\/code> \u0627\u0633 \u06a9\u0627 \u0645\u0648\u0627\u0632\u0646\u06c1 \u06a9\u06cc \u0642\u062f\u0631 \u0633\u06d2 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>course_id<\/code> \u06cc\u06c1 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0679\u06cc\u0628\u0644 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u06a9\u0627\u0644\u0645 \u06c1\u06d2\u06d4 \u062c\u0628 \u0627\u06cc\u06a9 \u0645\u0645\u0627\u062b\u0644 \u0642\u0637\u0627\u0631 \u0645\u0644 \u062c\u0627\u0626\u06d2\u06d4 <code>EXISTS<\/code> \u062a\u0634\u062e\u06cc\u0635 <code>TRUE<\/code> \u0628\u0646\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0648\u0627\u067e\u0633 \u06a9\u06cc\u06d2 \u06af\u0626\u06d2 \u06a9\u0648\u0631\u0633\u0632 \u0645\u06cc\u06ba \u0688\u06cc\u0679\u0627 \u06a9\u0627 \u062a\u062c\u0632\u06cc\u06c1 \u0634\u0627\u0645\u0644 \u06c1\u06d2\u06d4<\/p>\n<p>\u062f\u06cc\u06a9\u06be\u06cc\u06ba \u06a9\u06cc\u0633\u06d2 <code>EXISTS<\/code> \u062f\u0631\u062c \u0630\u06cc\u0644 \u0634\u0631\u0627\u0626\u0637 \u06a9\u0627 \u0627\u0646\u062f\u0627\u0632\u06c1 \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-sql\">EXISTS \u2192 TRUE \u2192 course included\n<\/code><\/pre>\n<p>\u0644\u06cc\u06a9\u0646 \u0627\u06af\u0631 <code>ID<\/code> \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u0648 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062f\u06c1 \u0646\u062a\u0627\u0626\u062c \u0645\u06cc\u06ba \u06a9\u0648\u0626\u06cc \u0645\u0645\u0627\u062b\u0644 \u0642\u0637\u0627\u0631\u06cc\u06ba \u0646\u06c1\u06cc\u06ba \u0645\u0644\u06cc\u06ba\u06d4 <code>course_id<\/code> \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0679\u06cc\u0628\u0644 \u0645\u06cc\u06ba \u06a9\u0627\u0644\u0645\u060c <code>EXISTS<\/code> \u062a\u0634\u062e\u06cc\u0635 <code>FALSE<\/code> \u06a9\u0648\u0631\u0633 \u06a9\u06d2 \u0646\u0627\u0645 \u0646\u062a\u0627\u0626\u062c \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0628\u0631\u0627\u06c1 \u06a9\u0631\u0645 \u0630\u06cc\u0644 \u0645\u06cc\u06ba \u062a\u0634\u062e\u06cc\u0635 \u06a9\u0627 \u0628\u06c1\u0627\u0624 \u062f\u06cc\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-sql\">EXISTS \u2192 FALSE \u2192 course excluded\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0639\u0645\u0644 \u0645\u0631\u06a9\u0632\u06cc \u0633\u0648\u0627\u0644 \u0645\u06cc\u06ba \u06c1\u0631 \u0642\u0637\u0627\u0631 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0627\u0631\u06cc \u0631\u06c1\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u062a\u06a9 \u06a9\u06c1 \u062a\u0645\u0627\u0645 \u0642\u0637\u0627\u0631\u0648\u06ba \u06a9\u0627 \u062c\u0627\u0626\u0632\u06c1 \u0646\u06c1 \u0644\u06cc\u0627 \u062c\u0627\u0626\u06d2\u06d4 \u0646\u06cc\u0686\u06d2 \u067e\u0648\u0631\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0627 \u062d\u062a\u0645\u06cc \u0646\u062a\u06cc\u062c\u06c1 \u062f\u06cc\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_376_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.png\" alt=\"\u06cc\u06c1 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0645 \u0627\u0632 \u06a9\u0645 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0648\u0627\u0644\u06d2 \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u06a9\u0648 \u062f\u06a9\u06be\u0627\u062a\u06cc \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"175\" height=\"142\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0646\u062a\u0627\u0626\u062c \u06a9\u0645 \u0627\u0632 \u06a9\u0645 \u0627\u06cc\u06a9 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062a\u0645\u0627\u0645 \u06a9\u0648\u0631\u0633\u0632 \u062f\u06a9\u06be\u0627\u0626\u06cc\u06ba \u06af\u06d2\u06d4<\/p>\n<p>\u0627\u06af\u0631 \u0622\u067e \u0627\u0646 \u0644\u0648\u06af\u0648\u06ba \u06a9\u0648 \u062f\u06a9\u06be\u0627\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0646\u06c1\u0648\u06ba \u0646\u06d2 \u0627\u0628\u06be\u06cc \u062a\u06a9 \u0631\u062c\u0633\u0679\u0631 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u06c1\u06d2\u061f<\/p>\n<pre><code class=\"language-sql\">SELECT \n    course_name\nFROM course AS l\nWHERE NOT EXISTS (SELECT 1\n              FROM registration AS r\n              WHERE r.course_id = l.id)\n<\/code><\/pre>\n<p>\u0634\u0627\u0645\u0644 \u06a9\u0631\u06a9\u06d2 <code>NOT<\/code> \u067e\u06c1\u0644\u06d2 <code>EXISTS<\/code>\u062d\u0627\u0644\u0627\u062a \u06a9\u0648 \u0627\u0644\u0679 \u062f\u06cc\u06ba\u06d4 \u0627\u06cc\u06a9 \u06cc\u0627 \u0632\u06cc\u0627\u062f\u06c1 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0648\u0631\u0633\u0632 \u0648\u0627\u067e\u0633 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u0628\u063a\u06cc\u0631 \u0627\u0646\u062f\u0631\u0627\u062c \u06a9\u06d2 \u06a9\u0648\u0631\u0633\u0632 \u0648\u0627\u067e\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/08\/1787018799_688_\u0627\u06cc\u0633-\u06a9\u06cc\u0648-\u0627\u06cc\u0644-\u0645\u06cc\u06ba-\u0630\u06cc\u0644\u06cc-\u0633\u0648\u0627\u0644\u0627\u062a-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4.png\" alt=\"\u06cc\u06c1 \u062a\u0635\u0648\u06cc\u0631 \u062f\u0648 \u06a9\u0648\u0631\u0633\u0632 \u062f\u06a9\u06be\u0627\u062a\u06cc \u06c1\u06d2 \u062c\u0646 \u06a9\u06cc \u0627\u0628\u06be\u06cc \u062a\u06a9 \u06a9\u0648\u0626\u06cc \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"156\" height=\"67\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0646\u062a\u0627\u0626\u062c \u062f\u0648 \u06a9\u0648\u0631\u0633\u0632 \u062f\u06a9\u06be\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0628\u06be\u06cc \u062a\u06a9 \u06a9\u0648\u0626\u06cc \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-conclusion\">\u0646\u062a\u06cc\u062c\u06c1<\/h2>\n<p>\u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631\u0627\u062a \u067e\u06c1\u0644\u06d2 \u0645\u0634\u06a9\u0644 \u0644\u06af \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 \u062c\u0628 \u06a9\u0633\u06cc \u0628\u0691\u06d2 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0627\u0646\u062f\u0631 \u0627\u0646\u062f\u0631 \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u0648\u06d4 \u0644\u06cc\u06a9\u0646 \u0633\u0628 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u0645\u0642\u0635\u062f \u0635\u0631\u0641 \u06c1\u06d2 <strong>\u0627\u06c1\u0645 \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u06cc \u062d\u0645\u0627\u06cc\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/strong>\u06cc\u06c1 \u06a9\u0627\u0645 \u06a9\u0631\u0646\u0627 \u0628\u06c1\u062a \u0622\u0633\u0627\u0646 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06c1\u0645 \u0628\u0627\u062a \u06cc\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u06a9\u06c1 \u06c1\u0631 \u0645\u0645\u06a9\u0646\u06c1 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0646\u0645\u0648\u0646\u06d2 \u06a9\u0648 \u06cc\u0627\u062f \u0631\u06a9\u06be\u06cc\u06ba\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0627\u0633\u06d2 \u067e\u06c1\u0686\u0627\u0646\u0646\u0627 \u0633\u06cc\u06a9\u06be\u06cc\u06ba\u06d4 <strong>\u0645\u0631\u06a9\u0632\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u06cc \u06a9\u06cc\u0627 \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2 \u0627\u0648\u0631 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u0627\u0633\u06d2 \u06a9\u06cc\u0633\u06d2 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/strong>. \u0627\u0633 \u0637\u0631\u0632\u0650 \u0641\u06a9\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be\u060c \u0627\u062e\u0630 \u06a9\u0631\u062f\u06c1 \u06a9\u0627\u0644\u0645\u060c \u0627\u062e\u0630 \u06a9\u0631\u062f\u06c1 \u062c\u062f\u0648\u0644\u060c <code>IN<\/code>, <code>EXISTS<\/code>\u0627\u0648\u0631 <code>NOT EXISTS<\/code> \u06cc\u06c1 \u067e\u06cc\u0686\u06cc\u062f\u06c1 SQL \u0646\u062d\u0648 \u06a9\u06cc \u0628\u062c\u0627\u0626\u06d2 \u0627\u06cc\u06a9 \u0639\u0645\u0644\u06cc \u0679\u0648\u0644 \u0628\u0646 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06a9\u0627\u0641\u06cc \u0645\u0634\u0642 \u06a9\u06d2 \u0633\u0627\u062a\u06be\u060c \u0622\u067e \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u0648 SQL \u06a9\u06cc \u067e\u06cc\u0686\u06cc\u062f\u06c1 \u062e\u0635\u0648\u0635\u06cc\u0627\u062a \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0645 \u0627\u0648\u0631 \u0632\u06cc\u0627\u062f\u06c1 \u067e\u06cc\u0686\u06cc\u062f\u06c1 \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u0627 \u062a\u062c\u0632\u06cc\u06c1 \u06a9\u0631\u0646\u06d2 \u0627\u0648\u0631 \u062d\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0642\u062f\u0631\u062a\u06cc \u0637\u0631\u06cc\u0642\u06d2 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u062f\u06cc\u06a9\u06be\u0646\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0631 \u062f\u06cc\u06ba \u06af\u06d2\u06d4<\/p>\n<\/p><\/div>","protected":false},"excerpt":{"rendered":"<p>\u062c\u0628 \u0628\u06be\u06cc \u0622\u067e \u0627\u06cc\u0633 \u06a9\u06cc\u0648 \u0627\u06cc\u0644 \u0645\u06cc\u06ba \u06a9\u0633\u06cc \u062f\u0648\u0633\u0631\u06d2 \u0633\u0648\u0627\u0644 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0627\u0646\u062f\u0631 \u0627\u0646\u062f\u0631 \u06a9\u0648\u0626\u06cc \u0633\u0648\u0627\u0644 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0630\u06cc\u0644\u06cc \u0633\u0648\u0627\u0644 \u06c1\u06d2\u06d4 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0633\u0648\u0627\u0644 \u0628\u06be\u06cc \u06a9\u06c1\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0648 \u0645\u06cc\u0646 \u0633\u0648\u0627\u0644 \u06cc\u0627 \u0628\u06cc\u0631\u0648\u0646\u06cc \u0633\u0648\u0627\u0644 \u06a9\u06c1\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0630\u06cc\u0644\u06cc \u0627\u0633\u062a\u0641\u0633\u0627\u0631\u0627\u062a \u06a9\u0648 \u0645\u0627\u062e\u0648\u0630 \u06a9\u0627\u0644\u0645\u0648\u06ba \u06cc\u0627 \u0627\u062e\u0630 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":27877,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-27876","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/27876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/comments?post=27876"}],"version-history":[{"count":1,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/27876\/revisions"}],"predecessor-version":[{"id":27878,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/27876\/revisions\/27878"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/media\/27877"}],"wp:attachment":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/media?parent=27876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/categories?post=27876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/tags?post=27876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}