This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Alvin Naufal | |
*/ | |
-- 11. Tampilkan nama produk dan nama category yang termasuk kategori Beverages, Dairy Products, dan Condiments | |
SELECT P.ProductName, C.CategoryName FROM Products P | |
INNER JOIN Categories C | |
ON P.CategoryID = C.CategoryID | |
WHERE C.CategoryName = 'Beverages' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Alvin Naufal | |
*/ | |
-- 6. Tampilkan kuantitas barang yang di order dengan nama produk = Geitost | |
SELECT O.Quantity FROM OrderDetails O | |
JOIN Products P | |
ON O.ProductID = P.ProductID | |
WHERE P.ProductName = 'Geitost'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Alvin Naufal | |
*/ | |
-- 1. Tampilkan Employees yang memiliki FirstName berinisial huruf 'A' | |
SELECT * FROM Employees WHERE FirstName LIKE 'A%'; | |
-- 2. Tampilkan jumlah Employees yang memiliki panjang LastName lebih dari 5 huruf | |
SELECT COUNT(EmployeeID) AS TotalEmployee FROM Employees WHERE LENGTH(LastName) > 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define Column Table & Table Name | |
public final class DatabaseContract { | |
private DatabaseContract() { | |
} | |
public static class TbDosen implements BaseColumns { | |
public static final String TABLE_NAME = "dosen"; | |
public static final String COLUMN_NAME_NAMA = "nama"; | |
public static final String COLUMN_NAME_EMAIL = "email"; | |
} |