Monday, December 7, 2020

.::: Study Kasus Praktis belajar Query create & insert table/Collection MongoDB (Data Warehouse) :::.


1. Create Database teguhth
use teguhth
show dbs 

log 
> use teguhth
switched to db teguhth
> show dbs
admin   0.000GB
brgxxx  0.000GB
config  0.000GB
kampus  0.000GB
local   0.000GB
toko    0.000GB
>
2. Create collection (table) Barang, suplier, customer, pasok, pembelian;
show collections
db.createCollection("Barang")
db.createCollection("suplier")
db.createCollection("customer")
db.createCollection("pasok")
db.createCollection("pembelian")
show collections

log 
> show collections
> db.createCollection("Barang")
{ "ok" : 1 }
> db.createCollection("suplier")
{ "ok" : 1 }
> db.createCollection("customer")
{ "ok" : 1 }
> db.createCollection("pasok")
{ "ok" : 1 }
> db.createCollection("pembelian")
{ "ok" : 1 }
> show collections
Barang
customer
pasok
pembelian
suplier
>
3. Insert collection barang 
db.barang.find();
db.barang.insert({"KODE_BARANG":"ELK-01", "NAMA_BARANG":"RICE COOKER", "SATUAN_BARANG":"BUAH", "STOK_BARANG":"20"});
db.barang.insert({"KODE_BARANG":"ELK-02", "NAMA_BARANG":"LEMARI ES", "SATUAN_BARANG":"UNIT", "STOK_BARANG":"20"});
db.barang.insert({"KODE_BARANG":"ELK-03", "NAMA_BARANG":"TELEVISI", "SATUAN_BARANG":"UNIT", "STOK_BARANG":"20"});
db.barang.insert({"KODE_BARANG":"ELK-04", "NAMA_BARANG":"RADIO/TAPE", "SATUAN_BARANG":"BUAH", "STOK_BARANG":"20"});
db.barang.insert({"KODE_BARANG":"ELK-05", "NAMA_BARANG":"KOMPUTER", "SATUAN_BARANG":"UNIT", "STOK_BARANG":"20"});
db.barang.insert({"KODE_BARANG":"ELK-06", "NAMA_BARANG":"KIPAS ANGIN", "SATUAN_BARANG":"BUAH", "STOK_BARANG":"20"});
db.barang.find();
db.barang.find().pretty();

log 
> db.barang.find();
> db.barang.insert({"KODE_BARANG":"ELK-01", "NAMA_BARANG":"RICE COOKER", "SATUAN_BARANG":"BUAH", "STOK_BARANG":"20"});
WriteResult({ "nInserted" : 1 })
> db.barang.insert({"KODE_BARANG":"ELK-02", "NAMA_BARANG":"LEMARI ES", "SATUAN_BARANG":"UNIT", "STOK_BARANG":"20"});
WriteResult({ "nInserted" : 1 })
> db.barang.insert({"KODE_BARANG":"ELK-03", "NAMA_BARANG":"TELEVISI", "SATUAN_BARANG":"UNIT", "STOK_BARANG":"20"});
WriteResult({ "nInserted" : 1 })
> db.barang.insert({"KODE_BARANG":"ELK-04", "NAMA_BARANG":"RADIO/TAPE", "SATUAN_BARANG":"BUAH", "STOK_BARANG":"20"});
WriteResult({ "nInserted" : 1 })
> db.barang.insert({"KODE_BARANG":"ELK-05", "NAMA_BARANG":"KOMPUTER", "SATUAN_BARANG":"UNIT", "STOK_BARANG":"20"});
WriteResult({ "nInserted" : 1 })
> db.barang.insert({"KODE_BARANG":"ELK-06", "NAMA_BARANG":"KIPAS ANGIN", "SATUAN_BARANG":"BUAH", "STOK_BARANG":"20"});
WriteResult({ "nInserted" : 1 })
> db.barang.find();
{ "_id" : ObjectId("5fcde2421d04c498f8aa951c"), "KODE_BARANG" : "ELK-01", "NAMA_BARANG" : "RICE COOKER", "SATUAN_BARANG" : "BUAH", "STOK_BARANG" : "20" }
{ "_id" : ObjectId("5fcde2431d04c498f8aa951d"), "KODE_BARANG" : "ELK-02", "NAMA_BARANG" : "LEMARI ES", "SATUAN_BARANG" : "UNIT", "STOK_BARANG" : "20" }
{ "_id" : ObjectId("5fcde2431d04c498f8aa951e"), "KODE_BARANG" : "ELK-03", "NAMA_BARANG" : "TELEVISI", "SATUAN_BARANG" : "UNIT", "STOK_BARANG" : "20" }
{ "_id" : ObjectId("5fcde2431d04c498f8aa951f"), "KODE_BARANG" : "ELK-04", "NAMA_BARANG" : "RADIO/TAPE", "SATUAN_BARANG" : "BUAH", "STOK_BARANG" : "20" }
{ "_id" : ObjectId("5fcde2431d04c498f8aa9520"), "KODE_BARANG" : "ELK-05", "NAMA_BARANG" : "KOMPUTER", "SATUAN_BARANG" : "UNIT", "STOK_BARANG" : "20" }
{ "_id" : ObjectId("5fcde2431d04c498f8aa9521"), "KODE_BARANG" : "ELK-06", "NAMA_BARANG" : "KIPAS ANGIN", "SATUAN_BARANG" : "BUAH", "STOK_BARANG" : "20" }
>
> db.barang.find().pretty();
{
        "_id" : ObjectId("5fcde2421d04c498f8aa951c"),
        "KODE_BARANG" : "ELK-01",
        "NAMA_BARANG" : "RICE COOKER",
        "SATUAN_BARANG" : "BUAH",
        "STOK_BARANG" : "20"
}
{
        "_id" : ObjectId("5fcde2431d04c498f8aa951d"),
        "KODE_BARANG" : "ELK-02",
        "NAMA_BARANG" : "LEMARI ES",
        "SATUAN_BARANG" : "UNIT",
        "STOK_BARANG" : "20"
}
{
        "_id" : ObjectId("5fcde2431d04c498f8aa951e"),
        "KODE_BARANG" : "ELK-03",
        "NAMA_BARANG" : "TELEVISI",
        "SATUAN_BARANG" : "UNIT",
        "STOK_BARANG" : "20"
}
{
        "_id" : ObjectId("5fcde2431d04c498f8aa951f"),
        "KODE_BARANG" : "ELK-04",
        "NAMA_BARANG" : "RADIO/TAPE",
        "SATUAN_BARANG" : "BUAH",
        "STOK_BARANG" : "20"
}
{
        "_id" : ObjectId("5fcde2431d04c498f8aa9520"),
        "KODE_BARANG" : "ELK-05",
        "NAMA_BARANG" : "KOMPUTER",
        "SATUAN_BARANG" : "UNIT",
        "STOK_BARANG" : "20"
}
{
        "_id" : ObjectId("5fcde2431d04c498f8aa9521"),
        "KODE_BARANG" : "ELK-06",
        "NAMA_BARANG" : "KIPAS ANGIN",
        "SATUAN_BARANG" : "BUAH",
        "STOK_BARANG" : "20"
}
>

3. Insert collection suplier 
db.suplier.find();
db.suplier.insert({"KODE_SUPLIER":"EJ-01", "NAMA_SUPLIER":"PT ACTRON", "ALAMAT_SUPLIER":"JL THAMRIN 12", "KOTA_SUPLIER":"JAKARTA", "TELEPON_SUPLIER":"(021) 850-2301"});
db.suplier.insert({"KODE_SUPLIER":"EJ-02", "NAMA_SUPLIER":"PT MULYA ELEKTRONIK", "ALAMAT_SUPLIER":"JL SUDIRMAN 45", "KOTA_SUPLIER":"JAKARTA", "TELEPON_SUPLIER":"(021) 855-4262"});
db.suplier.insert({"KODE_SUPLIER":"EB-01", "NAMA_SUPLIER":"PT ULTRASOUND", "ALAMAT_SUPLIER":"JL SUKARNO HATTA 103", "KOTA_SUPLIER":"BANDUNG", "TELEPON_SUPLIER":"(021) 522-3305"});
db.suplier.insert({"KODE_SUPLIER":"EB-02", "NAMA_SUPLIER":"PT SUPERTRON", "ALAMAT_SUPLIER":"JL INDUSTRI 37", "KOTA_SUPLIER":"BANDUNG", "TELEPON_SUPLIER":"(021) 660-4091"});
db.suplier.insert({"KODE_SUPLIER":"EB-03", "NAMA_SUPLIER":"PT OCHANG", "ALAMAT_SUPLIER":"JL KOSAMBI 44", "KOTA_SUPLIER":"BANDUNG", "TELEPON_SUPLIER":"(022) 850-4444"});
db.suplier.insert({"KODE_SUPLIER":"EB-04", "NAMA_SUPLIER":"PT TUNGGAL JAYA", "ALAMAT_SUPLIER":"JL KIARA CONDONG 77", "KOTA_SUPLIER":"BANDUNG", "TELEPON_SUPLIER":"(022)740-7777"});
db.suplier.find();
db.suplier.find().pretty();

log 
> db.suplier.find();
> db.suplier.insert({"KODE_SUPLIER":"EJ-01", "NAMA_SUPLIER":"PT ACTRON", "ALAMAT_SUPLIER":"JL THAMRIN 12", "KOTA_SUPLIER":"JAKARTA", "TELEPON_SUPLIER":"(021) 850-2301"});
WriteResult({ "nInserted" : 1 })
> db.suplier.insert({"KODE_SUPLIER":"EJ-02", "NAMA_SUPLIER":"PT MULYA ELEKTRONIK", "ALAMAT_SUPLIER":"JL SUDIRMAN 45", "KOTA_SUPLIER":"JAKARTA", "TELEPON_SUPLIER":"(021) 855-4262"});
WriteResult({ "nInserted" : 1 })
> db.suplier.insert({"KODE_SUPLIER":"EB-01", "NAMA_SUPLIER":"PT ULTRASOUND", "ALAMAT_SUPLIER":"JL SUKARNO HATTA 103", "KOTA_SUPLIER":"BANDUNG", "TELEPON_SUPLIER":"(021) 522-3305"});
WriteResult({ "nInserted" : 1 })
> db.suplier.insert({"KODE_SUPLIER":"EB-02", "NAMA_SUPLIER":"PT SUPERTRON", "ALAMAT_SUPLIER":"JL INDUSTRI 37", "KOTA_SUPLIER":"BANDUNG", "TELEPON_SUPLIER":"(021) 660-4091"});
WriteResult({ "nInserted" : 1 })
> db.suplier.insert({"KODE_SUPLIER":"EB-03", "NAMA_SUPLIER":"PT OCHANG", "ALAMAT_SUPLIER":"JL KOSAMBI 44", "KOTA_SUPLIER":"BANDUNG", "TELEPON_SUPLIER":"(022) 850-4444"});
WriteResult({ "nInserted" : 1 })
> db.suplier.insert({"KODE_SUPLIER":"EB-04", "NAMA_SUPLIER":"PT TUNGGAL JAYA", "ALAMAT_SUPLIER":"JL KIARA CONDONG 77", "KOTA_SUPLIER":"BANDUNG", "TELEPON_SUPLIER":"(022)740-7777"});
WriteResult({ "nInserted" : 1 })
> db.suplier.find();
{ "_id" : ObjectId("5fcde2841d04c498f8aa9522"), "KODE_SUPLIER" : "EJ-01", "NAMA_SUPLIER" : "PT ACTRON", "ALAMAT_SUPLIER" : "JL THAMRIN 12", "KOTA_SUPLIER" : "JAKARTA", "TELEPON_SUPLIER" : "(021) 850-2301" }
{ "_id" : ObjectId("5fcde2841d04c498f8aa9523"), "KODE_SUPLIER" : "EJ-02", "NAMA_SUPLIER" : "PT MULYA ELEKTRONIK", "ALAMAT_SUPLIER" : "JL SUDIRMAN 45", "KOTA_SUPLIER" : "JAKARTA", "TELEPON_SUPLIER" : "(021) 855-4262" }
{ "_id" : ObjectId("5fcde2841d04c498f8aa9524"), "KODE_SUPLIER" : "EB-01", "NAMA_SUPLIER" : "PT ULTRASOUND", "ALAMAT_SUPLIER" : "JL SUKARNO HATTA 103", "KOTA_SUPLIER" : "BANDUNG", "TELEPON_SUPLIER" : "(021) 522-3305" }
{ "_id" : ObjectId("5fcde2841d04c498f8aa9525"), "KODE_SUPLIER" : "EB-02", "NAMA_SUPLIER" : "PT SUPERTRON", "ALAMAT_SUPLIER" : "JL INDUSTRI 37", "KOTA_SUPLIER" : "BANDUNG", "TELEPON_SUPLIER" : "(021) 660-4091" }
{ "_id" : ObjectId("5fcde2841d04c498f8aa9526"), "KODE_SUPLIER" : "EB-03", "NAMA_SUPLIER" : "PT OCHANG", "ALAMAT_SUPLIER" : "JL KOSAMBI 44", "KOTA_SUPLIER" : "BANDUNG", "TELEPON_SUPLIER" : "(022) 850-4444" }
{ "_id" : ObjectId("5fcde2841d04c498f8aa9527"), "KODE_SUPLIER" : "EB-04", "NAMA_SUPLIER" : "PT TUNGGAL JAYA", "ALAMAT_SUPLIER" : "JL KIARA CONDONG 77", "KOTA_SUPLIER" : "BANDUNG", "TELEPON_SUPLIER" : "(022)740-7777" }

> db.suplier.find().pretty();
{
        "_id" : ObjectId("5fcde2841d04c498f8aa9522"),
        "KODE_SUPLIER" : "EJ-01",
        "NAMA_SUPLIER" : "PT ACTRON",
        "ALAMAT_SUPLIER" : "JL THAMRIN 12",
        "KOTA_SUPLIER" : "JAKARTA",
        "TELEPON_SUPLIER" : "(021) 850-2301"
}
{
        "_id" : ObjectId("5fcde2841d04c498f8aa9523"),
        "KODE_SUPLIER" : "EJ-02",
        "NAMA_SUPLIER" : "PT MULYA ELEKTRONIK",
        "ALAMAT_SUPLIER" : "JL SUDIRMAN 45",
        "KOTA_SUPLIER" : "JAKARTA",
        "TELEPON_SUPLIER" : "(021) 855-4262"
}
{
        "_id" : ObjectId("5fcde2841d04c498f8aa9524"),
        "KODE_SUPLIER" : "EB-01",
        "NAMA_SUPLIER" : "PT ULTRASOUND",
        "ALAMAT_SUPLIER" : "JL SUKARNO HATTA 103",
        "KOTA_SUPLIER" : "BANDUNG",
        "TELEPON_SUPLIER" : "(021) 522-3305"
}
{
        "_id" : ObjectId("5fcde2841d04c498f8aa9525"),
        "KODE_SUPLIER" : "EB-02",
        "NAMA_SUPLIER" : "PT SUPERTRON",
        "ALAMAT_SUPLIER" : "JL INDUSTRI 37",
        "KOTA_SUPLIER" : "BANDUNG",
        "TELEPON_SUPLIER" : "(021) 660-4091"
}
{
        "_id" : ObjectId("5fcde2841d04c498f8aa9526"),
        "KODE_SUPLIER" : "EB-03",
        "NAMA_SUPLIER" : "PT OCHANG",
        "ALAMAT_SUPLIER" : "JL KOSAMBI 44",
        "KOTA_SUPLIER" : "BANDUNG",
        "TELEPON_SUPLIER" : "(022) 850-4444"
}
{
        "_id" : ObjectId("5fcde2841d04c498f8aa9527"),
        "KODE_SUPLIER" : "EB-04",
        "NAMA_SUPLIER" : "PT TUNGGAL JAYA",
        "ALAMAT_SUPLIER" : "JL KIARA CONDONG 77",
        "KOTA_SUPLIER" : "BANDUNG",
        "TELEPON_SUPLIER" : "(022)740-7777"
}
>


4. insert collection customer
db.customer.find();
db.customer.insert({"KODE_CUSTOMER":"J-0001", "NAMA_CUSTOMER":"TOKO KARISMA", "ALAMAT_CUSTOMER":"JL CIMANGGIS 34", "KOTA_CUSTOMER":"JAKARTA", "TELEPON_CUSTOMER":"(021) 856-4209"});
db.customer.insert({"KODE_CUSTOMER":"J-0002", "NAMA_CUSTOMER":"TOKO AYU", "ALAMAT_CUSTOMER":"JL CIMANGGIS 12", "KOTA_CUSTOMER":"JAKARTA", "TELEPON_CUSTOMER":"(021) 856-1321"});
db.customer.insert({"KODE_CUSTOMER":"B-0001", "NAMA_CUSTOMER":"TOKO WARNA", "ALAMAT_CUSTOMER":"JL ABC 234", "KOTA_CUSTOMER":"BANDUNG", "TELEPON_CUSTOMER":"(022) 432-6635"});
db.customer.insert({"KODE_CUSTOMER":"B-0002", "NAMA_CUSTOMER":"TOKO SURYA", "ALAMAT_CUSTOMER":"JL ABC 309", "KOTA_CUSTOMER":"BANDUNG", "TELEPON_CUSTOMER":"(022) 432-6024"});
db.customer.insert({"KODE_CUSTOMER":"B-0003", "NAMA_CUSTOMER":"TOKO MAHARANI", "ALAMAT_CUSTOMER":"JL KOPO 333", "KOTA_CUSTOMER":"BANDUNG", "TELEPON_CUSTOMER":"(022) 856-3333"});
db.customer.insert({"KODE_CUSTOMER":"B-0004", "NAMA_CUSTOMER":"TOKO MULYA", "ALAMAT_CUSTOMER":"JL OTISTA 555", "KOTA_CUSTOMER":"BANDUNG", "TELEPON_CUSTOMER":"(022) 422-5555"});
db.customer.find();
db.customer.find().pretty();
log 
> db.customer.find();
> db.customer.insert({"KODE_CUSTOMER":"J-0001", "NAMA_CUSTOMER":"TOKO KARISMA", "ALAMAT_CUSTOMER":"JL CIMANGGIS 34", "KOTA_CUSTOMER":"JAKARTA", "TELEPON_CUSTOMER":"(021) 856-4209"});
WriteResult({ "nInserted" : 1 })
> db.customer.insert({"KODE_CUSTOMER":"J-0002", "NAMA_CUSTOMER":"TOKO AYU", "ALAMAT_CUSTOMER":"JL CIMANGGIS 12", "KOTA_CUSTOMER":"JAKARTA", "TELEPON_CUSTOMER":"(021) 856-1321"});
WriteResult({ "nInserted" : 1 })
> db.customer.insert({"KODE_CUSTOMER":"B-0001", "NAMA_CUSTOMER":"TOKO WARNA", "ALAMAT_CUSTOMER":"JL ABC 234", "KOTA_CUSTOMER":"BANDUNG", "TELEPON_CUSTOMER":"(022) 432-6635"});
WriteResult({ "nInserted" : 1 })
> db.customer.insert({"KODE_CUSTOMER":"B-0002", "NAMA_CUSTOMER":"TOKO SURYA", "ALAMAT_CUSTOMER":"JL ABC 309", "KOTA_CUSTOMER":"BANDUNG", "TELEPON_CUSTOMER":"(022) 432-6024"});
WriteResult({ "nInserted" : 1 })
> db.customer.insert({"KODE_CUSTOMER":"B-0003", "NAMA_CUSTOMER":"TOKO MAHARANI", "ALAMAT_CUSTOMER":"JL KOPO 333", "KOTA_CUSTOMER":"BANDUNG", "TELEPON_CUSTOMER":"(022) 856-3333"});
WriteResult({ "nInserted" : 1 })
> db.customer.insert({"KODE_CUSTOMER":"B-0004", "NAMA_CUSTOMER":"TOKO MULYA", "ALAMAT_CUSTOMER":"JL OTISTA 555", "KOTA_CUSTOMER":"BANDUNG", "TELEPON_CUSTOMER":"(022) 422-5555"});
WriteResult({ "nInserted" : 1 })
> db.customer.find();
{ "_id" : ObjectId("5fcde2ca1d04c498f8aa9528"), "KODE_CUSTOMER" : "J-0001", "NAMA_CUSTOMER" : "TOKO KARISMA", "ALAMAT_CUSTOMER" : "JL CIMANGGIS 34", "KOTA_CUSTOMER" : "JAKARTA", "TELEPON_CUSTOMER" : "(021) 856-4209" }
{ "_id" : ObjectId("5fcde2ca1d04c498f8aa9529"), "KODE_CUSTOMER" : "J-0002", "NAMA_CUSTOMER" : "TOKO AYU", "ALAMAT_CUSTOMER" : "JL CIMANGGIS 12", "KOTA_CUSTOMER" : "JAKARTA", "TELEPON_CUSTOMER" : "(021) 856-1321" }
{ "_id" : ObjectId("5fcde2ca1d04c498f8aa952a"), "KODE_CUSTOMER" : "B-0001", "NAMA_CUSTOMER" : "TOKO WARNA", "ALAMAT_CUSTOMER" : "JL ABC 234", "KOTA_CUSTOMER" : "BANDUNG", "TELEPON_CUSTOMER" : "(022) 432-6635" }
{ "_id" : ObjectId("5fcde2ca1d04c498f8aa952b"), "KODE_CUSTOMER" : "B-0002", "NAMA_CUSTOMER" : "TOKO SURYA", "ALAMAT_CUSTOMER" : "JL ABC 309", "KOTA_CUSTOMER" : "BANDUNG", "TELEPON_CUSTOMER" : "(022) 432-6024" }
{ "_id" : ObjectId("5fcde2ca1d04c498f8aa952c"), "KODE_CUSTOMER" : "B-0003", "NAMA_CUSTOMER" : "TOKO MAHARANI", "ALAMAT_CUSTOMER" : "JL KOPO 333", "KOTA_CUSTOMER" : "BANDUNG", "TELEPON_CUSTOMER" : "(022) 856-3333" }
{ "_id" : ObjectId("5fcde2ca1d04c498f8aa952d"), "KODE_CUSTOMER" : "B-0004", "NAMA_CUSTOMER" : "TOKO MULYA", "ALAMAT_CUSTOMER" : "JL OTISTA 555", "KOTA_CUSTOMER" : "BANDUNG", "TELEPON_CUSTOMER" : "(022) 422-5555" }

> db.customer.find().pretty();
{
        "_id" : ObjectId("5fcde2ca1d04c498f8aa9528"),
        "KODE_CUSTOMER" : "J-0001",
        "NAMA_CUSTOMER" : "TOKO KARISMA",
        "ALAMAT_CUSTOMER" : "JL CIMANGGIS 34",
        "KOTA_CUSTOMER" : "JAKARTA",
        "TELEPON_CUSTOMER" : "(021) 856-4209"
}
{
        "_id" : ObjectId("5fcde2ca1d04c498f8aa9529"),
        "KODE_CUSTOMER" : "J-0002",
        "NAMA_CUSTOMER" : "TOKO AYU",
        "ALAMAT_CUSTOMER" : "JL CIMANGGIS 12",
        "KOTA_CUSTOMER" : "JAKARTA",
        "TELEPON_CUSTOMER" : "(021) 856-1321"
}
{
        "_id" : ObjectId("5fcde2ca1d04c498f8aa952a"),
        "KODE_CUSTOMER" : "B-0001",
        "NAMA_CUSTOMER" : "TOKO WARNA",
        "ALAMAT_CUSTOMER" : "JL ABC 234",
        "KOTA_CUSTOMER" : "BANDUNG",
        "TELEPON_CUSTOMER" : "(022) 432-6635"
}
{
        "_id" : ObjectId("5fcde2ca1d04c498f8aa952b"),
        "KODE_CUSTOMER" : "B-0002",
        "NAMA_CUSTOMER" : "TOKO SURYA",
        "ALAMAT_CUSTOMER" : "JL ABC 309",
        "KOTA_CUSTOMER" : "BANDUNG",
        "TELEPON_CUSTOMER" : "(022) 432-6024"
}
{
        "_id" : ObjectId("5fcde2ca1d04c498f8aa952c"),
        "KODE_CUSTOMER" : "B-0003",
        "NAMA_CUSTOMER" : "TOKO MAHARANI",
        "ALAMAT_CUSTOMER" : "JL KOPO 333",
        "KOTA_CUSTOMER" : "BANDUNG",
        "TELEPON_CUSTOMER" : "(022) 856-3333"
}
{
        "_id" : ObjectId("5fcde2ca1d04c498f8aa952d"),
        "KODE_CUSTOMER" : "B-0004",
        "NAMA_CUSTOMER" : "TOKO MULYA",
        "ALAMAT_CUSTOMER" : "JL OTISTA 555",
        "KOTA_CUSTOMER" : "BANDUNG",
        "TELEPON_CUSTOMER" : "(022) 422-5555"
}
>


5. insert collection pasok
db.pasok.find();
db.pasok.insert({"KODE_PASOK":"PAS-E001", "KODE_BARANG":"ELK-01", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"1-Jan-02", "JUMLAH_PASOK":"8"});
db.pasok.insert({"KODE_PASOK":"PAS-E002", "KODE_BARANG":"ELK-01", "KODE_SUPLIER":"EJ-02", "TANGGAL_PASOK":"1-Jan-02", "JUMLAH_PASOK":"5"});
db.pasok.insert({"KODE_PASOK":"PAS-E003", "KODE_BARANG":"ELK-02", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"1-Feb-02", "JUMLAH_PASOK":"2"});
db.pasok.insert({"KODE_PASOK":"PAS-E004", "KODE_BARANG":"ELK-02", "KODE_SUPLIER":"EJ-02", "TANGGAL_PASOK":"2-Feb-02", "JUMLAH_PASOK":"3"});
db.pasok.insert({"KODE_PASOK":"PAS-E005", "KODE_BARANG":"ELK-02", "KODE_SUPLIER":"EJ-02", "TANGGAL_PASOK":"1-Jan-02", "JUMLAH_PASOK":"2"});
db.pasok.insert({"KODE_PASOK":"PAS-E006", "KODE_BARANG":"ELK-03", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"3-Mar-02", "JUMLAH_PASOK":"5"});
db.pasok.insert({"KODE_PASOK":"PAS-E007", "KODE_BARANG":"ELK-03", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"4-Mar-02", "JUMLAH_PASOK":"2"});
db.pasok.insert({"KODE_PASOK":"PAS-E008", "KODE_BARANG":"ELK-03", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"3-Mar-02", "JUMLAH_PASOK":"3"});
db.pasok.insert({"KODE_PASOK":"PAS-E009", "KODE_BARANG":"ELK-03", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"13-Mar-02", "JUMLAH_PASOK":"4"});
db.pasok.insert({"KODE_PASOK":"PAS-E010", "KODE_BARANG":"ELK-03", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"13-Mar-02", "JUMLAH_PASOK":"3"});
db.pasok.insert({"KODE_PASOK":"PAS-E011", "KODE_BARANG":"ELK-04", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"22-Apr-02", "JUMLAH_PASOK":"12"});
db.pasok.insert({"KODE_PASOK":"PAS-E012", "KODE_BARANG":"ELK-04", "KODE_SUPLIER":"EJ-02", "TANGGAL_PASOK":"30-Apr-02", "JUMLAH_PASOK":"9"});
db.pasok.find();
db.pasok.find().pretty();
log 
> db.pasok.find();
> db.pasok.insert({"KODE_PASOK":"PAS-E001", "KODE_BARANG":"ELK-01", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"1-Jan-02", "JUMLAH_PASOK":"8"});
WriteResult({ "nInserted" : 1 })
> db.pasok.insert({"KODE_PASOK":"PAS-E002", "KODE_BARANG":"ELK-01", "KODE_SUPLIER":"EJ-02", "TANGGAL_PASOK":"1-Jan-02", "JUMLAH_PASOK":"5"});
WriteResult({ "nInserted" : 1 })
> db.pasok.insert({"KODE_PASOK":"PAS-E003", "KODE_BARANG":"ELK-02", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"1-Feb-02", "JUMLAH_PASOK":"2"});
WriteResult({ "nInserted" : 1 })
> db.pasok.insert({"KODE_PASOK":"PAS-E004", "KODE_BARANG":"ELK-02", "KODE_SUPLIER":"EJ-02", "TANGGAL_PASOK":"2-Feb-02", "JUMLAH_PASOK":"3"});
WriteResult({ "nInserted" : 1 })
> db.pasok.insert({"KODE_PASOK":"PAS-E005", "KODE_BARANG":"ELK-02", "KODE_SUPLIER":"EJ-02", "TANGGAL_PASOK":"1-Jan-02", "JUMLAH_PASOK":"2"});
WriteResult({ "nInserted" : 1 })
> db.pasok.insert({"KODE_PASOK":"PAS-E006", "KODE_BARANG":"ELK-03", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"3-Mar-02", "JUMLAH_PASOK":"5"});
WriteResult({ "nInserted" : 1 })
> db.pasok.insert({"KODE_PASOK":"PAS-E007", "KODE_BARANG":"ELK-03", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"4-Mar-02", "JUMLAH_PASOK":"2"});
WriteResult({ "nInserted" : 1 })
> db.pasok.insert({"KODE_PASOK":"PAS-E008", "KODE_BARANG":"ELK-03", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"3-Mar-02", "JUMLAH_PASOK":"3"});
WriteResult({ "nInserted" : 1 })
> db.pasok.insert({"KODE_PASOK":"PAS-E009", "KODE_BARANG":"ELK-03", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"13-Mar-02", "JUMLAH_PASOK":"4"});
WriteResult({ "nInserted" : 1 })
> db.pasok.insert({"KODE_PASOK":"PAS-E010", "KODE_BARANG":"ELK-03", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"13-Mar-02", "JUMLAH_PASOK":"3"});
WriteResult({ "nInserted" : 1 })
> db.pasok.insert({"KODE_PASOK":"PAS-E011", "KODE_BARANG":"ELK-04", "KODE_SUPLIER":"EJ-01", "TANGGAL_PASOK":"22-Apr-02", "JUMLAH_PASOK":"12"});
WriteResult({ "nInserted" : 1 })
> db.pasok.insert({"KODE_PASOK":"PAS-E012", "KODE_BARANG":"ELK-04", "KODE_SUPLIER":"EJ-02", "TANGGAL_PASOK":"30-Apr-02", "JUMLAH_PASOK":"9"});
WriteResult({ "nInserted" : 1 })
> db.pasok.find();
{ "_id" : ObjectId("5fcde3091d04c498f8aa952e"), "KODE_PASOK" : "PAS-E001", "KODE_BARANG" : "ELK-01", "KODE_SUPLIER" : "EJ-01", "TANGGAL_PASOK" : "1-Jan-02", "JUMLAH_PASOK" : "8" }
{ "_id" : ObjectId("5fcde3091d04c498f8aa952f"), "KODE_PASOK" : "PAS-E002", "KODE_BARANG" : "ELK-01", "KODE_SUPLIER" : "EJ-02", "TANGGAL_PASOK" : "1-Jan-02", "JUMLAH_PASOK" : "5" }
{ "_id" : ObjectId("5fcde3091d04c498f8aa9530"), "KODE_PASOK" : "PAS-E003", "KODE_BARANG" : "ELK-02", "KODE_SUPLIER" : "EJ-01", "TANGGAL_PASOK" : "1-Feb-02", "JUMLAH_PASOK" : "2" }
{ "_id" : ObjectId("5fcde3091d04c498f8aa9531"), "KODE_PASOK" : "PAS-E004", "KODE_BARANG" : "ELK-02", "KODE_SUPLIER" : "EJ-02", "TANGGAL_PASOK" : "2-Feb-02", "JUMLAH_PASOK" : "3" }
{ "_id" : ObjectId("5fcde3091d04c498f8aa9532"), "KODE_PASOK" : "PAS-E005", "KODE_BARANG" : "ELK-02", "KODE_SUPLIER" : "EJ-02", "TANGGAL_PASOK" : "1-Jan-02", "JUMLAH_PASOK" : "2" }
{ "_id" : ObjectId("5fcde3091d04c498f8aa9533"), "KODE_PASOK" : "PAS-E006", "KODE_BARANG" : "ELK-03", "KODE_SUPLIER" : "EJ-01", "TANGGAL_PASOK" : "3-Mar-02", "JUMLAH_PASOK" : "5" }
{ "_id" : ObjectId("5fcde3091d04c498f8aa9534"), "KODE_PASOK" : "PAS-E007", "KODE_BARANG" : "ELK-03", "KODE_SUPLIER" : "EJ-01", "TANGGAL_PASOK" : "4-Mar-02", "JUMLAH_PASOK" : "2" }
{ "_id" : ObjectId("5fcde3091d04c498f8aa9535"), "KODE_PASOK" : "PAS-E008", "KODE_BARANG" : "ELK-03", "KODE_SUPLIER" : "EJ-01", "TANGGAL_PASOK" : "3-Mar-02", "JUMLAH_PASOK" : "3" }
{ "_id" : ObjectId("5fcde3091d04c498f8aa9536"), "KODE_PASOK" : "PAS-E009", "KODE_BARANG" : "ELK-03", "KODE_SUPLIER" : "EJ-01", "TANGGAL_PASOK" : "13-Mar-02", "JUMLAH_PASOK" : "4" }
{ "_id" : ObjectId("5fcde3091d04c498f8aa9537"), "KODE_PASOK" : "PAS-E010", "KODE_BARANG" : "ELK-03", "KODE_SUPLIER" : "EJ-01", "TANGGAL_PASOK" : "13-Mar-02", "JUMLAH_PASOK" : "3" }
{ "_id" : ObjectId("5fcde3091d04c498f8aa9538"), "KODE_PASOK" : "PAS-E011", "KODE_BARANG" : "ELK-04", "KODE_SUPLIER" : "EJ-01", "TANGGAL_PASOK" : "22-Apr-02", "JUMLAH_PASOK" : "12" }
{ "_id" : ObjectId("5fcde3091d04c498f8aa9539"), "KODE_PASOK" : "PAS-E012", "KODE_BARANG" : "ELK-04", "KODE_SUPLIER" : "EJ-02", "TANGGAL_PASOK" : "30-Apr-02", "JUMLAH_PASOK" : "9" }
> db.pasok.find().pretty();
{
        "_id" : ObjectId("5fcde3091d04c498f8aa952e"),
        "KODE_PASOK" : "PAS-E001",
        "KODE_BARANG" : "ELK-01",
        "KODE_SUPLIER" : "EJ-01",
        "TANGGAL_PASOK" : "1-Jan-02",
        "JUMLAH_PASOK" : "8"
}
{
        "_id" : ObjectId("5fcde3091d04c498f8aa952f"),
        "KODE_PASOK" : "PAS-E002",
        "KODE_BARANG" : "ELK-01",
        "KODE_SUPLIER" : "EJ-02",
        "TANGGAL_PASOK" : "1-Jan-02",
        "JUMLAH_PASOK" : "5"
}
{
        "_id" : ObjectId("5fcde3091d04c498f8aa9530"),
        "KODE_PASOK" : "PAS-E003",
        "KODE_BARANG" : "ELK-02",
        "KODE_SUPLIER" : "EJ-01",
        "TANGGAL_PASOK" : "1-Feb-02",
        "JUMLAH_PASOK" : "2"
}
{
        "_id" : ObjectId("5fcde3091d04c498f8aa9531"),
        "KODE_PASOK" : "PAS-E004",
        "KODE_BARANG" : "ELK-02",
        "KODE_SUPLIER" : "EJ-02",
        "TANGGAL_PASOK" : "2-Feb-02",
        "JUMLAH_PASOK" : "3"
}
{
        "_id" : ObjectId("5fcde3091d04c498f8aa9532"),
        "KODE_PASOK" : "PAS-E005",
        "KODE_BARANG" : "ELK-02",
        "KODE_SUPLIER" : "EJ-02",
        "TANGGAL_PASOK" : "1-Jan-02",
        "JUMLAH_PASOK" : "2"
}
{
        "_id" : ObjectId("5fcde3091d04c498f8aa9533"),
        "KODE_PASOK" : "PAS-E006",
        "KODE_BARANG" : "ELK-03",
        "KODE_SUPLIER" : "EJ-01",
        "TANGGAL_PASOK" : "3-Mar-02",
        "JUMLAH_PASOK" : "5"
}
{
        "_id" : ObjectId("5fcde3091d04c498f8aa9534"),
        "KODE_PASOK" : "PAS-E007",
        "KODE_BARANG" : "ELK-03",
        "KODE_SUPLIER" : "EJ-01",
        "TANGGAL_PASOK" : "4-Mar-02",
        "JUMLAH_PASOK" : "2"
}
{
        "_id" : ObjectId("5fcde3091d04c498f8aa9535"),
        "KODE_PASOK" : "PAS-E008",
        "KODE_BARANG" : "ELK-03",
        "KODE_SUPLIER" : "EJ-01",
        "TANGGAL_PASOK" : "3-Mar-02",
        "JUMLAH_PASOK" : "3"
}
{
        "_id" : ObjectId("5fcde3091d04c498f8aa9536"),
        "KODE_PASOK" : "PAS-E009",
        "KODE_BARANG" : "ELK-03",
        "KODE_SUPLIER" : "EJ-01",
        "TANGGAL_PASOK" : "13-Mar-02",
        "JUMLAH_PASOK" : "4"
}
{
        "_id" : ObjectId("5fcde3091d04c498f8aa9537"),
        "KODE_PASOK" : "PAS-E010",
        "KODE_BARANG" : "ELK-03",
        "KODE_SUPLIER" : "EJ-01",
        "TANGGAL_PASOK" : "13-Mar-02",
        "JUMLAH_PASOK" : "3"
}
{
        "_id" : ObjectId("5fcde3091d04c498f8aa9538"),
        "KODE_PASOK" : "PAS-E011",
        "KODE_BARANG" : "ELK-04",
        "KODE_SUPLIER" : "EJ-01",
        "TANGGAL_PASOK" : "22-Apr-02",
        "JUMLAH_PASOK" : "12"
}
{
        "_id" : ObjectId("5fcde3091d04c498f8aa9539"),
        "KODE_PASOK" : "PAS-E012",
        "KODE_BARANG" : "ELK-04",
        "KODE_SUPLIER" : "EJ-02",
        "TANGGAL_PASOK" : "30-Apr-02",
        "JUMLAH_PASOK" : "9"
}
>


5. insert collection pembelian
db.pembelian.find();
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-01", "KODE_CUSTOMER":"J-0001", "TANGGAL_PEMBELIAN":"20-May-02", "20-May-02":"3"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-01", "KODE_CUSTOMER":"J-0001", "TANGGAL_PEMBELIAN":"21-May-02", "20-May-02":"4"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-01", "KODE_CUSTOMER":"J-0002", "TANGGAL_PEMBELIAN":"20-May-02", "20-May-02":"2"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-01", "KODE_CUSTOMER":"B-0001", "TANGGAL_PEMBELIAN":"20-May-02", "20-May-02":"2"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-01", "KODE_CUSTOMER":"B-0002", "TANGGAL_PEMBELIAN":"22-May-02", "20-May-02":"3"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-02", "KODE_CUSTOMER":"J-0001", "TANGGAL_PEMBELIAN":"24-Jun-02", "20-May-02":"1"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-02", "KODE_CUSTOMER":"J-0002", "TANGGAL_PEMBELIAN":"24-Jun-02", "20-May-02":"1"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-02", "KODE_CUSTOMER":"B-0001", "TANGGAL_PEMBELIAN":"25-Jun-02", "20-May-02":"2"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-02", "KODE_CUSTOMER":"B-0002", "TANGGAL_PEMBELIAN":"25-Jun-02", "20-May-02":"2"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-03", "KODE_CUSTOMER":"J-0001", "TANGGAL_PEMBELIAN":"20-Jun-02", "20-May-02":"5"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-03", "KODE_CUSTOMER":"J-0002", "TANGGAL_PEMBELIAN":"2-Jul-02", "20-May-02":"4"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-03", "KODE_CUSTOMER":"B-0001", "TANGGAL_PEMBELIAN":"4-Jul-02", "20-May-02":"6"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-03", "KODE_CUSTOMER":"J-0001", "TANGGAL_PEMBELIAN":"10-Jul-02", "20-May-02":"5"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-04", "KODE_CUSTOMER":"J-0002", "TANGGAL_PEMBELIAN":"15-Jul-02", "20-May-02":"12"});
db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-04", "KODE_CUSTOMER":"B-0002", "TANGGAL_PEMBELIAN":"17-Jul-02", "20-May-02":"15"});
db.pembelian.find();
db.pembelian.find().pretty();
log 
> db.pembelian.find();
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-01", "KODE_CUSTOMER":"J-0001", "TANGGAL_PEMBELIAN":"20-May-02", "20-May-02":"3"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-01", "KODE_CUSTOMER":"J-0001", "TANGGAL_PEMBELIAN":"21-May-02", "20-May-02":"4"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-01", "KODE_CUSTOMER":"J-0002", "TANGGAL_PEMBELIAN":"20-May-02", "20-May-02":"2"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-01", "KODE_CUSTOMER":"B-0001", "TANGGAL_PEMBELIAN":"20-May-02", "20-May-02":"2"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-01", "KODE_CUSTOMER":"B-0002", "TANGGAL_PEMBELIAN":"22-May-02", "20-May-02":"3"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-02", "KODE_CUSTOMER":"J-0001", "TANGGAL_PEMBELIAN":"24-Jun-02", "20-May-02":"1"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-02", "KODE_CUSTOMER":"J-0002", "TANGGAL_PEMBELIAN":"24-Jun-02", "20-May-02":"1"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-02", "KODE_CUSTOMER":"B-0001", "TANGGAL_PEMBELIAN":"25-Jun-02", "20-May-02":"2"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-02", "KODE_CUSTOMER":"B-0002", "TANGGAL_PEMBELIAN":"25-Jun-02", "20-May-02":"2"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-03", "KODE_CUSTOMER":"J-0001", "TANGGAL_PEMBELIAN":"20-Jun-02", "20-May-02":"5"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-03", "KODE_CUSTOMER":"J-0002", "TANGGAL_PEMBELIAN":"2-Jul-02", "20-May-02":"4"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-03", "KODE_CUSTOMER":"B-0001", "TANGGAL_PEMBELIAN":"4-Jul-02", "20-May-02":"6"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-03", "KODE_CUSTOMER":"J-0001", "TANGGAL_PEMBELIAN":"10-Jul-02", "20-May-02":"5"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-04", "KODE_CUSTOMER":"J-0002", "TANGGAL_PEMBELIAN":"15-Jul-02", "20-May-02":"12"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.insert({"KODE_PEMBELIAN":"BEL-E001", "KODE_BARANG":"ELK-04", "KODE_CUSTOMER":"B-0002", "TANGGAL_PEMBELIAN":"17-Jul-02", "20-May-02":"15"});
WriteResult({ "nInserted" : 1 })
> db.pembelian.find();
{ "_id" : ObjectId("5fcde34a1d04c498f8aa953a"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-01", "KODE_CUSTOMER" : "J-0001", "TANGGAL_PEMBELIAN" : "20-May-02", "20-May-02" : "3" }
{ "_id" : ObjectId("5fcde34a1d04c498f8aa953b"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-01", "KODE_CUSTOMER" : "J-0001", "TANGGAL_PEMBELIAN" : "21-May-02", "20-May-02" : "4" }
{ "_id" : ObjectId("5fcde34a1d04c498f8aa953c"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-01", "KODE_CUSTOMER" : "J-0002", "TANGGAL_PEMBELIAN" : "20-May-02", "20-May-02" : "2" }
{ "_id" : ObjectId("5fcde34a1d04c498f8aa953d"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-01", "KODE_CUSTOMER" : "B-0001", "TANGGAL_PEMBELIAN" : "20-May-02", "20-May-02" : "2" }
{ "_id" : ObjectId("5fcde34a1d04c498f8aa953e"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-01", "KODE_CUSTOMER" : "B-0002", "TANGGAL_PEMBELIAN" : "22-May-02", "20-May-02" : "3" }
{ "_id" : ObjectId("5fcde34a1d04c498f8aa953f"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-02", "KODE_CUSTOMER" : "J-0001", "TANGGAL_PEMBELIAN" : "24-Jun-02", "20-May-02" : "1" }
{ "_id" : ObjectId("5fcde34a1d04c498f8aa9540"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-02", "KODE_CUSTOMER" : "J-0002", "TANGGAL_PEMBELIAN" : "24-Jun-02", "20-May-02" : "1" }
{ "_id" : ObjectId("5fcde34a1d04c498f8aa9541"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-02", "KODE_CUSTOMER" : "B-0001", "TANGGAL_PEMBELIAN" : "25-Jun-02", "20-May-02" : "2" }
{ "_id" : ObjectId("5fcde34a1d04c498f8aa9542"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-02", "KODE_CUSTOMER" : "B-0002", "TANGGAL_PEMBELIAN" : "25-Jun-02", "20-May-02" : "2" }
{ "_id" : ObjectId("5fcde34a1d04c498f8aa9543"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-03", "KODE_CUSTOMER" : "J-0001", "TANGGAL_PEMBELIAN" : "20-Jun-02", "20-May-02" : "5" }
{ "_id" : ObjectId("5fcde34a1d04c498f8aa9544"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-03", "KODE_CUSTOMER" : "J-0002", "TANGGAL_PEMBELIAN" : "2-Jul-02", "20-May-02" : "4" }
{ "_id" : ObjectId("5fcde34a1d04c498f8aa9545"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-03", "KODE_CUSTOMER" : "B-0001", "TANGGAL_PEMBELIAN" : "4-Jul-02", "20-May-02" : "6" }
{ "_id" : ObjectId("5fcde34b1d04c498f8aa9546"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-03", "KODE_CUSTOMER" : "J-0001", "TANGGAL_PEMBELIAN" : "10-Jul-02", "20-May-02" : "5" }
{ "_id" : ObjectId("5fcde34b1d04c498f8aa9547"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-04", "KODE_CUSTOMER" : "J-0002", "TANGGAL_PEMBELIAN" : "15-Jul-02", "20-May-02" : "12" }
{ "_id" : ObjectId("5fcde34b1d04c498f8aa9548"), "KODE_PEMBELIAN" : "BEL-E001", "KODE_BARANG" : "ELK-04", "KODE_CUSTOMER" : "B-0002", "TANGGAL_PEMBELIAN" : "17-Jul-02", "20-May-02" : "15" }

> db.pembelian.find().pretty();
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa953a"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-01",
        "KODE_CUSTOMER" : "J-0001",
        "TANGGAL_PEMBELIAN" : "20-May-02",
        "20-May-02" : "3"
}
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa953b"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-01",
        "KODE_CUSTOMER" : "J-0001",
        "TANGGAL_PEMBELIAN" : "21-May-02",
        "20-May-02" : "4"
}
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa953c"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-01",
        "KODE_CUSTOMER" : "J-0002",
        "TANGGAL_PEMBELIAN" : "20-May-02",
        "20-May-02" : "2"
}
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa953d"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-01",
        "KODE_CUSTOMER" : "B-0001",
        "TANGGAL_PEMBELIAN" : "20-May-02",
        "20-May-02" : "2"
}
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa953e"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-01",
        "KODE_CUSTOMER" : "B-0002",
        "TANGGAL_PEMBELIAN" : "22-May-02",
        "20-May-02" : "3"
}
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa953f"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-02",
        "KODE_CUSTOMER" : "J-0001",
        "TANGGAL_PEMBELIAN" : "24-Jun-02",
        "20-May-02" : "1"
}
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa9540"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-02",
        "KODE_CUSTOMER" : "J-0002",
        "TANGGAL_PEMBELIAN" : "24-Jun-02",
        "20-May-02" : "1"
}
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa9541"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-02",
        "KODE_CUSTOMER" : "B-0001",
        "TANGGAL_PEMBELIAN" : "25-Jun-02",
        "20-May-02" : "2"
}
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa9542"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-02",
        "KODE_CUSTOMER" : "B-0002",
        "TANGGAL_PEMBELIAN" : "25-Jun-02",
        "20-May-02" : "2"
}
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa9543"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-03",
        "KODE_CUSTOMER" : "J-0001",
        "TANGGAL_PEMBELIAN" : "20-Jun-02",
        "20-May-02" : "5"
}
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa9544"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-03",
        "KODE_CUSTOMER" : "J-0002",
        "TANGGAL_PEMBELIAN" : "2-Jul-02",
        "20-May-02" : "4"
}
{
        "_id" : ObjectId("5fcde34a1d04c498f8aa9545"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-03",
        "KODE_CUSTOMER" : "B-0001",
        "TANGGAL_PEMBELIAN" : "4-Jul-02",
        "20-May-02" : "6"
}
{
        "_id" : ObjectId("5fcde34b1d04c498f8aa9546"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-03",
        "KODE_CUSTOMER" : "J-0001",
        "TANGGAL_PEMBELIAN" : "10-Jul-02",
        "20-May-02" : "5"
}
{
        "_id" : ObjectId("5fcde34b1d04c498f8aa9547"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-04",
        "KODE_CUSTOMER" : "J-0002",
        "TANGGAL_PEMBELIAN" : "15-Jul-02",
        "20-May-02" : "12"
}
{
        "_id" : ObjectId("5fcde34b1d04c498f8aa9548"),
        "KODE_PEMBELIAN" : "BEL-E001",
        "KODE_BARANG" : "ELK-04",
        "KODE_CUSTOMER" : "B-0002",
        "TANGGAL_PEMBELIAN" : "17-Jul-02",
        "20-May-02" : "15"
}
>



No comments:

Post a Comment

Popular Posts