Team Ai
Datasetpublic

GD-ML/AndroidCode

sourceHugging Facemitupdated 6mo agoView on Hugging Face
1likes3.4kdownloads
10719_6.html210 linesDownload Raw Back to 10719
1<html>2<head>3<meta charset="utf-8">4<title>SQL Subqueries Slides</title>5<style>6  body { margin: 0; padding: 0; background: transparent; font-family: Arial, Helvetica, sans-serif; }7  #render-target {8    width: 1080px;9    height: 2400px;10    position: relative;11    overflow: hidden;12    background: #ffffff;13  }14 15  /* Top status bar */16  #status-bar {17    position: absolute;18    top: 0;19    left: 0;20    width: 100%;21    height: 100px;22    background: #111111;23    color: #ffffff;24  }25  #status-bar .time {26    position: absolute;27    left: 34px;28    top: 26px;29    font-size: 40px;30    font-weight: 700;31    letter-spacing: 1px;32  }33  #status-bar .icons {34    position: absolute;35    right: 24px;36    top: 24px;37    display: flex;38    gap: 28px;39    align-items: center;40  }41 42  /* Floating page indicator */43  .page-pill {44    position: absolute;45    left: 40px;46    top: 180px;47    background: #111111;48    color: #ffffff;49    border-radius: 28px;50    padding: 18px 28px;51    font-size: 36px;52    box-shadow: 0 4px 12px rgba(0,0,0,0.35);53  }54 55  /* Scrollable content */56  #content {57    position: absolute;58    top: 100px;59    left: 0;60    right: 0;61    bottom: 0;62    overflow: auto;63    padding-bottom: 140px;64  }65 66  .section { padding: 40px 64px; }67  hr.sep {68    border: none;69    height: 24px;70    background: #E6E6E6;71    margin: 16px 0;72  }73 74  h1 {75    font-size: 64px;76    margin: 24px 0 12px 0;77    color: #e53935;78    line-height: 1.15;79  }80  p {81    font-size: 34px;82    line-height: 1.6;83    color: #333333;84    margin: 14px 0;85  }86  .label {87    font-weight: 700;88    font-size: 36px;89    color: #111111;90    margin-top: 22px;91    margin-bottom: 8px;92  }93  pre {94    background: #f7f7f7;95    border: 1px solid #dddddd;96    border-left: 6px solid #cfcfcf;97    padding: 22px 26px;98    font-size: 32px;99    line-height: 1.7;100    border-radius: 8px;101    white-space: pre-wrap;102    color: #222;103  }104 105  /* Right floating scroll indicator */106  .blue-dot {107    position: absolute;108    right: 32px;109    top: 1410px;110    width: 72px;111    height: 72px;112    background: #4a90e2;113    border-radius: 50%;114    box-shadow: 0 2px 6px rgba(0,0,0,0.2);115  }116 117  /* Bottom gesture pill */118  .bottom-pill {119    position: absolute;120    left: 50%;121    transform: translateX(-50%);122    bottom: 28px;123    width: 420px;124    height: 18px;125    background: #000000;126    border-radius: 10px;127    opacity: 0.85;128  }129</style>130</head>131<body>132<div id="render-target">133 134  <!-- Status Bar -->135  <div id="status-bar">136    <div class="time">9:13</div>137    <div class="icons">138      <!-- Simple inline SVG icons -->139      <svg width="42" height="42" viewBox="0 0 42 42" aria-hidden="true">140        <rect x="6" y="8" width="30" height="26" rx="6" ry="6" fill="#ffffff"></rect>141      </svg>142      <svg width="42" height="42" viewBox="0 0 42 42" aria-hidden="true">143        <circle cx="21" cy="21" r="8" fill="#ffffff"></circle>144      </svg>145      <svg width="42" height="42" viewBox="0 0 42 42" aria-hidden="true">146        <path d="M5 28 L15 14 L25 28 Z" fill="#ffffff"></path>147      </svg>148    </div>149  </div>150 151  <!-- Floating page indicator -->152  <div class="page-pill">39 of 58</div>153 154  <!-- Content -->155  <div id="content">156    <div class="section" style="padding-top: 32px;">157      <pre>INSERT INTO EMPLOYEE_BKP158  SELECT * FROM EMPLOYEE159  WHERE ID IN (SELECT ID160               FROM EMPLOYEE);</pre>161    </div>162 163    <hr class="sep">164 165    <div class="section">166      <h1>Subqueries with the UPDATE Statement</h1>167      <p>The subquery of SQL can be used in conjunction with the Update statement. When a subquery is used with the Update statement, then either single or multiple columns in a table can be updated.</p>168 169      <div class="label">Syntax:</div>170      <pre>UPDATE table  SET column_name = new_value  WHERE VALUE OPERATOR171    (SELECT COLUMN_NAME  FROM TABLE_NAME  WHERE condition);</pre>172 173      <div class="label">Example:</div>174      <p>Let's assume we have an EMPLOYEE_BKP table available which is backup of EMPLOYEE table. The given example updates the SALARY by .25 times in the EMPLOYEE table for all employee whose AGE is greater than or equal to 29.</p>175 176      <pre>UPDATE EMPLOYEE177  SET SALARY = SALARY * 0.25178  WHERE AGE IN (SELECT AGE FROM CUSTOMERS_BKP179                WHERE AGE &gt;= 29);</pre>180    </div>181 182    <hr class="sep">183 184    <div class="section">185      <h1>Subqueries with the DELETE Statement</h1>186      <p>The subquery of SQL can be used in conjunction with the Delete statement just like any other statements mentioned above.</p>187 188      <div class="label">Syntax:</div>189      <pre>DELETE FROM TABLE_NAME  WHERE VALUE OPERATOR190  (SELECT COLUMN_NAME  FROM TABLE_NAME  WHERE condition);</pre>191 192      <div class="label">Example:</div>193      <p>Let's assume we have an EMPLOYEE_BKP table available which is backup of EMPLOYEE table. The given example deletes the records from the EMPLOYEE table for all EMPLOYEE whose AGE is greater than or equal to 29.</p>194 195      <pre>DELETE FROM EMPLOYEE196  WHERE AGE IN (SELECT AGE FROM EMPLOYEE_BKP197                WHERE AGE &gt;= 29 );</pre>198    </div>199 200    <hr class="sep" style="margin-top: 40px;">201  </div>202 203  <!-- Right floating scroll indicator -->204  <div class="blue-dot"></div>205 206  <!-- Bottom gesture bar -->207  <div class="bottom-pill"></div>208</div>209</body>210</html>
GD-ML/AndroidCode · Team Ai