Ma’lumotlar tahlili
1-laboratoriya ishi
1-yacheyka
SELECT *
FROM Invoice
WHERE InvoiceDate like '2013%'
2-yacheyka
SELECT FirstName, LastName, Country
FROM Customer
WHERE ((Country='Brazil')OR(Country='Canada')OR(Country='India')OR(Country='Sweden'))
3-yacheyka
SELECT t.Name,t.Composer,a.Title
FROM Album as a
JOIN Track as t
ON t.AlbumId=a.AlbumId
WHERE t.Name LIKE 'A%' AND t.Composer IS NOT NULL ;
4-yacheyka
SELECT c.FirstName ,c.LastName, i.Total
FROM Customer c
JOIN Invoice i
ON c.customerid = i.customerid
ORDER BY i.Total DESC LIMIT 10
2-laboratoriya ishi
1-yacheyka:
SELECT billingcountry, count(invoicedate) AS Invoices
FROM Invoice GROUP BY billingcountry
ORDER BY Invoices DESC;
2-yacheyka:
SELECT billingcity, max(TotalSum) AS Total FROM (
SELECT billingcity, sum(total) AS TotalSum FROM Invoice GROUP BY billingcity);
3-yacheyka:
SELECT c.CustomerId, c.FirstName, c.LastName, sum(i.Total) as TotalSpent
FROM Customer c, Invoice i
WHERE c.CustomerId=i.CustomerId
GROUP BY (i.CustomerId)
ORDER BY TotalSpent desc
LIMIT 1;
4-yacheyka:
SELECT distinct email,firstname,lastname,e.name
FROM Customer a,Invoice b,InvoiceLine c,Track d,Genre e
WHERE a.Customerid=b.Customerid AND b.Invoiceid=c.Invoiceid
AND c.Trackid=d.Trackid AND d.Genreid=e.Genreid AND e.name = 'Rock' ORDER BY email;
5-yacheyka:
WITH tab1 AS
(
SELECT c.CustomerId, c.FirstName, c.LastName, c.Country, SUM(i.Total) TotalSpent
FROM Customer c
JOIN Invoice i ON c.CustomerId = i.CustomerId
GROUP BY c.CustomerId
)
SELECT tab1.*
FROM tab1
JOIN
(
SELECT CustomerId, FirstName, LastName, Country, MAX(TotalSpent) AS TotalSpent
FROM tab1
GROUP BY Country
) tab2
ON tab1.Country = tab2.Country
WHERE tab1.TotalSpent = tab2.TotalSpent
ORDER BY Country;
Android dasturlash javoblari
1-laboratoriya ishi
public class MyCalculator {
int input1 = 10;
int input2 = 20;
int input3 = 30;
int input4 = 40;
int input5 = 50;
public float average() {
float avg = (input1+input2+input3+input4+input5)/5;
return avg;
}
}
2-laboratoriya ishi
class MyCalculator {
public float sum (float a, float b){
return (a+b);
}
public float divid (float a, float b){
return (a/b);
}
public float subtract (float a, float b){
return (a-b);
}
public float multiply (float a, float b){
return (a*b);
}
}
Frontend web-dasturlash javoblari
1-laboratoriya ishi
Googledan foydalanib o’zingizga yoqqan hayvon rasmini toping va yuklab oling.
So’ng “+” tugmasini bosib rasm faylini loyihaga yuklang
“Upload File” bosamiz.
Yuklab olingan hayvon rasmiga yo’lni ko’rsatamiz
Laboratoriy sahifasining chap tomonida yuklangan fayl nomi paydo bo’ladi (dog.jpg).
“card.html” fayliga kod yozamiz:
“card.html” kodi:
Do'stlaringiz bilan baham: |