<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Học SQL cơ bản cho Data Analyst trong 10p &#8211; Phần 0	</title>
	<atom:link href="https://data-fun.com/sql-co-ban-data-analyst/feed/" rel="self" type="application/rss+xml" />
	<link>https://data-fun.com/sql-co-ban-data-analyst/</link>
	<description>Học phân tích dữ liệu Data Analysis BI cho người mới.  Data-Fun.com</description>
	<lastBuildDate>Thu, 18 May 2023 09:16:38 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.10</generator>
	<item>
		<title>
		By: Vi Nam		</title>
		<link>https://data-fun.com/sql-co-ban-data-analyst/#comment-3109</link>

		<dc:creator><![CDATA[Vi Nam]]></dc:creator>
		<pubDate>Thu, 18 May 2023 09:16:38 +0000</pubDate>
		<guid isPermaLink="false">https://data-fun.com/?p=229#comment-3109</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://data-fun.com/sql-co-ban-data-analyst/#comment-298&quot;&gt;An Pham&lt;/a&gt;.

+) Ở bài 2 dù dùng group by name hay ko dùng thì đều ra kết quả giống nhau mà nhỉ
+) Hàm SUM(cột A) sẽ cộng tất cả các giá trị của cột A lại (tức là nó sẽ cộng theo chiều dọc). Nên SUM(attack+defense+speed) sẽ cộng tất cả các giá trị  từ 3 cột attack, cột defense, cột speed lại với nhau (cộng cả chiều ngang với chiều dọc) nên Tong_chiso sẽ bị cao lên khá nhiều]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://data-fun.com/sql-co-ban-data-analyst/#comment-298">An Pham</a>.</p>
<p>+) Ở bài 2 dù dùng group by name hay ko dùng thì đều ra kết quả giống nhau mà nhỉ<br />
+) Hàm SUM(cột A) sẽ cộng tất cả các giá trị của cột A lại (tức là nó sẽ cộng theo chiều dọc). Nên SUM(attack+defense+speed) sẽ cộng tất cả các giá trị  từ 3 cột attack, cột defense, cột speed lại với nhau (cộng cả chiều ngang với chiều dọc) nên Tong_chiso sẽ bị cao lên khá nhiều</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alan Huỳnh		</title>
		<link>https://data-fun.com/sql-co-ban-data-analyst/#comment-2761</link>

		<dc:creator><![CDATA[Alan Huỳnh]]></dc:creator>
		<pubDate>Sun, 03 Jul 2022 03:18:58 +0000</pubDate>
		<guid isPermaLink="false">https://data-fun.com/?p=229#comment-2761</guid>

					<description><![CDATA[1.select type1, count(type1) as num_pokemon
from pokemon p 
group by type1 

2.select type1
from pokemon p 
where attack&#060;50 and defense&#060;50 and speed&#060;50
group by type1 
limit 10

3.select type1, avg(attack) ,avg(defense) 
from pokemon p 
group by type1

4.select name
from pokemon p 
where is_legendary = 1 and type1 = &#039;fire&#039; and type2 is not null

5.select type1, min(base_total), avg(base_total) ,max(base_total) 
from pokemon p 
group by type1 

6.select type1, max(base_total) as highest_base_total
from pokemon p 
where not is_legendary 
group by type1 
order by highest_base_total desc 
limit 10

Em xin phép nộp bài ạ, cảm ơn anh]]></description>
			<content:encoded><![CDATA[<p>1.select type1, count(type1) as num_pokemon<br />
from pokemon p<br />
group by type1 </p>
<p>2.select type1<br />
from pokemon p<br />
where attack&lt;50 and defense&lt;50 and speed&lt;50<br />
group by type1<br />
limit 10</p>
<p>3.select type1, avg(attack) ,avg(defense)<br />
from pokemon p<br />
group by type1</p>
<p>4.select name<br />
from pokemon p<br />
where is_legendary = 1 and type1 = &#039;fire&#039; and type2 is not null</p>
<p>5.select type1, min(base_total), avg(base_total) ,max(base_total)<br />
from pokemon p<br />
group by type1 </p>
<p>6.select type1, max(base_total) as highest_base_total<br />
from pokemon p<br />
where not is_legendary<br />
group by type1<br />
order by highest_base_total desc<br />
limit 10</p>
<p>Em xin phép nộp bài ạ, cảm ơn anh</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Thành Trung		</title>
		<link>https://data-fun.com/sql-co-ban-data-analyst/#comment-1518</link>

		<dc:creator><![CDATA[Thành Trung]]></dc:creator>
		<pubDate>Tue, 24 Aug 2021 14:42:38 +0000</pubDate>
		<guid isPermaLink="false">https://data-fun.com/?p=229#comment-1518</guid>

					<description><![CDATA[1. select type1 as pokemon_type ,count(*) as quantity
from pokemon
group by type1

2. select name as pokemon_name ,attack+defense+speed as properties_sum
from pokemon
order by properties_sum asc
limit 10

3. select type1 as pokemon_type ,AVG(attack) as avg_A ,AVG(defense) as avg_D
from pokemon
group by pokemon_type

4.select * 
from pokemon
where is_legendary = 1 and type1  type2 and type1=’fire’

5. select type1 as pokemon_type ,max(base_total) as highest_base_total ,min(base_total) as lowest_base_total ,avg(base_total) as avg_base_total
from pokemon
group by type1

6. select * 
from pokemon
where is_legendary=0
order by base_total desc
limit 10

Cám ơn anh rất nhiều &#060;3]]></description>
			<content:encoded><![CDATA[<p>1. select type1 as pokemon_type ,count(*) as quantity<br />
from pokemon<br />
group by type1</p>
<p>2. select name as pokemon_name ,attack+defense+speed as properties_sum<br />
from pokemon<br />
order by properties_sum asc<br />
limit 10</p>
<p>3. select type1 as pokemon_type ,AVG(attack) as avg_A ,AVG(defense) as avg_D<br />
from pokemon<br />
group by pokemon_type</p>
<p>4.select *<br />
from pokemon<br />
where is_legendary = 1 and type1  type2 and type1=’fire’</p>
<p>5. select type1 as pokemon_type ,max(base_total) as highest_base_total ,min(base_total) as lowest_base_total ,avg(base_total) as avg_base_total<br />
from pokemon<br />
group by type1</p>
<p>6. select *<br />
from pokemon<br />
where is_legendary=0<br />
order by base_total desc<br />
limit 10</p>
<p>Cám ơn anh rất nhiều &lt;3</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Thành Trung		</title>
		<link>https://data-fun.com/sql-co-ban-data-analyst/#comment-1514</link>

		<dc:creator><![CDATA[Thành Trung]]></dc:creator>
		<pubDate>Mon, 23 Aug 2021 14:26:03 +0000</pubDate>
		<guid isPermaLink="false">https://data-fun.com/?p=229#comment-1514</guid>

					<description><![CDATA[Anh cho em hỏi trong quá trình làm, nếu đang làm dở dang và muốn lưu lại để lúc rảnh tiếp tục làm mà không bị mất các câu lệnh đã nhập thì làm cách nào ạ]]></description>
			<content:encoded><![CDATA[<p>Anh cho em hỏi trong quá trình làm, nếu đang làm dở dang và muốn lưu lại để lúc rảnh tiếp tục làm mà không bị mất các câu lệnh đã nhập thì làm cách nào ạ</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: vi nguyen		</title>
		<link>https://data-fun.com/sql-co-ban-data-analyst/#comment-333</link>

		<dc:creator><![CDATA[vi nguyen]]></dc:creator>
		<pubDate>Mon, 14 Dec 2020 01:32:02 +0000</pubDate>
		<guid isPermaLink="false">https://data-fun.com/?p=229#comment-333</guid>

					<description><![CDATA[1.
select type1,  count(type1)
from pokemon p 
group by type1
2.
select name, attack , defense,  speed
from pokemon p 
order by (attack+defense+speed) asc 
limit 10]]></description>
			<content:encoded><![CDATA[<p>1.<br />
select type1,  count(type1)<br />
from pokemon p<br />
group by type1<br />
2.<br />
select name, attack , defense,  speed<br />
from pokemon p<br />
order by (attack+defense+speed) asc<br />
limit 10</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: An Pham		</title>
		<link>https://data-fun.com/sql-co-ban-data-analyst/#comment-298</link>

		<dc:creator><![CDATA[An Pham]]></dc:creator>
		<pubDate>Sat, 12 Sep 2020 11:53:37 +0000</pubDate>
		<guid isPermaLink="false">https://data-fun.com/?p=229#comment-298</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://data-fun.com/sql-co-ban-data-analyst/#comment-237&quot;&gt;Trung Do Thanh&lt;/a&gt;.

bro cho mình hỏi, ở bài 2 tại sao lại phải group by name nhỉ? mình có thử ko group by name, thì bị lặp kết quả.
ngoài ra, hình như phần SUM(attack+defense+speed) là chưa đúng, nếu dùng SUM mình thấy phần Tong_chiso bị cao lên khá nhiều, ko biết là do đâu nữa]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://data-fun.com/sql-co-ban-data-analyst/#comment-237">Trung Do Thanh</a>.</p>
<p>bro cho mình hỏi, ở bài 2 tại sao lại phải group by name nhỉ? mình có thử ko group by name, thì bị lặp kết quả.<br />
ngoài ra, hình như phần SUM(attack+defense+speed) là chưa đúng, nếu dùng SUM mình thấy phần Tong_chiso bị cao lên khá nhiều, ko biết là do đâu nữa</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: HIEU		</title>
		<link>https://data-fun.com/sql-co-ban-data-analyst/#comment-254</link>

		<dc:creator><![CDATA[HIEU]]></dc:creator>
		<pubDate>Sat, 04 Jul 2020 07:14:39 +0000</pubDate>
		<guid isPermaLink="false">https://data-fun.com/?p=229#comment-254</guid>

					<description><![CDATA[4, select *
from pokemon p 
where is_legendary = 1 and type1 = &quot;fire&quot; and type2 is not null
5, select type1 as name, max(base_total) as caonhat, min(base_total) as thapnhat, avg(base_total ) as trungbinh
from pokemon p 
group by type1
6, select name, base_total 
from pokemon 
where is_legendary = 0
group by name
order by base_total desc
limit 10
Ps: This is aff of SQL having a result from me, in case it wrong i want to get any comment and opinion from friends.]]></description>
			<content:encoded><![CDATA[<p>4, select *<br />
from pokemon p<br />
where is_legendary = 1 and type1 = &#8220;fire&#8221; and type2 is not null<br />
5, select type1 as name, max(base_total) as caonhat, min(base_total) as thapnhat, avg(base_total ) as trungbinh<br />
from pokemon p<br />
group by type1<br />
6, select name, base_total<br />
from pokemon<br />
where is_legendary = 0<br />
group by name<br />
order by base_total desc<br />
limit 10<br />
Ps: This is aff of SQL having a result from me, in case it wrong i want to get any comment and opinion from friends.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: HIEU		</title>
		<link>https://data-fun.com/sql-co-ban-data-analyst/#comment-253</link>

		<dc:creator><![CDATA[HIEU]]></dc:creator>
		<pubDate>Sat, 04 Jul 2020 06:16:27 +0000</pubDate>
		<guid isPermaLink="false">https://data-fun.com/?p=229#comment-253</guid>

					<description><![CDATA[1, select type1 as name, count(type1) as soluong
from pokemon p2 
group by type1
2, select type1 as name, attack, defense, speed
from pokemon
group by type1
order by (attack + defense + speed) asc
limit 10
3, select type1 as name, attack, defense, (attack+defense)/2 as trungbinh
from pokemon
group by type1
the results from newbie]]></description>
			<content:encoded><![CDATA[<p>1, select type1 as name, count(type1) as soluong<br />
from pokemon p2<br />
group by type1<br />
2, select type1 as name, attack, defense, speed<br />
from pokemon<br />
group by type1<br />
order by (attack + defense + speed) asc<br />
limit 10<br />
3, select type1 as name, attack, defense, (attack+defense)/2 as trungbinh<br />
from pokemon<br />
group by type1<br />
the results from newbie</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Trung Do Thanh		</title>
		<link>https://data-fun.com/sql-co-ban-data-analyst/#comment-237</link>

		<dc:creator><![CDATA[Trung Do Thanh]]></dc:creator>
		<pubDate>Thu, 11 Jun 2020 07:06:48 +0000</pubDate>
		<guid isPermaLink="false">https://data-fun.com/?p=229#comment-237</guid>

					<description><![CDATA[1/ SELECT type1, COUNT(type1) as Qty FROM pokemon 
GROUP by type1 
ORDER by Qty DESC

2/SELECT name,attack,defense,speed, SUM(attack+defense+speed) as Tong_chiso 
FROM pokemon
GROUP BY name
ORDER BY Tong_chiso ASC
LIMIT 10

3/SELECT type1,attack,defense, AVG(attack+defense) as Trungbinh_Chiso FROM pokemon
GROUP BY type1
ORDER BY Trungbinh_chiso DESC

4/SELECT name,type1, type2, is_legendary FROM pokemon
WHERE type1 = &#039;fire&#039; AND is_legendary = 1 AND type1  type2
GROUP BY name

5/SELECT type1, MAX(base_total) as max_total, MIN(base_total) AS min_total, AVG(base_total) AS avg_total 
FROM pokemon
GROUP BY type1
ORDER BY max_total DESC

6/SELECT name, base_total FROM pokemon
WHERE is_legendary = 0
GROUP BY name
ORDER by base_total DESC
LIMIT 10]]></description>
			<content:encoded><![CDATA[<p>1/ SELECT type1, COUNT(type1) as Qty FROM pokemon<br />
GROUP by type1<br />
ORDER by Qty DESC</p>
<p>2/SELECT name,attack,defense,speed, SUM(attack+defense+speed) as Tong_chiso<br />
FROM pokemon<br />
GROUP BY name<br />
ORDER BY Tong_chiso ASC<br />
LIMIT 10</p>
<p>3/SELECT type1,attack,defense, AVG(attack+defense) as Trungbinh_Chiso FROM pokemon<br />
GROUP BY type1<br />
ORDER BY Trungbinh_chiso DESC</p>
<p>4/SELECT name,type1, type2, is_legendary FROM pokemon<br />
WHERE type1 = &#8216;fire&#8217; AND is_legendary = 1 AND type1  type2<br />
GROUP BY name</p>
<p>5/SELECT type1, MAX(base_total) as max_total, MIN(base_total) AS min_total, AVG(base_total) AS avg_total<br />
FROM pokemon<br />
GROUP BY type1<br />
ORDER BY max_total DESC</p>
<p>6/SELECT name, base_total FROM pokemon<br />
WHERE is_legendary = 0<br />
GROUP BY name<br />
ORDER by base_total DESC<br />
LIMIT 10</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Lê Đức Trọng		</title>
		<link>https://data-fun.com/sql-co-ban-data-analyst/#comment-197</link>

		<dc:creator><![CDATA[Lê Đức Trọng]]></dc:creator>
		<pubDate>Tue, 25 Feb 2020 11:27:25 +0000</pubDate>
		<guid isPermaLink="false">https://data-fun.com/?p=229#comment-197</guid>

					<description><![CDATA[Em gửi phần của mình. Cảm ơn anh nhiều ạ.
1. 
select type1, count(name) as num_pokemon
from pokemon p
group by type1
order by num_pokemon desc
2. 
select name, (attack+defense+speed) as chiso 
from pokemon p
group by chiso 	
order by chiso asc 
limit 10
3. Cho biết điểm trung bình Attack và Defense của mỗi loại Pokemon. Sử dụng Type1.
select type1, avg (attack+defense) as trungbinh
from pokemon p 
group by type1
order by trungbinh asc
4. 
select name, type1, type2, is_legendary 
from pokemon p
where is_legendary=1 and type1=&#039;Fire&#039; and type1 and type2 
5.
select type1, max(base_total) as lonnhat, avg(base_total) as trungbinh, min(base_total) as nhonhat 
from pokemon p 
group by type1
6. 
select name, (base_total) as chiso
from pokemon p
where not is_legendary 
group by name 
order by base_total desc 
limit 10]]></description>
			<content:encoded><![CDATA[<p>Em gửi phần của mình. Cảm ơn anh nhiều ạ.<br />
1.<br />
select type1, count(name) as num_pokemon<br />
from pokemon p<br />
group by type1<br />
order by num_pokemon desc<br />
2.<br />
select name, (attack+defense+speed) as chiso<br />
from pokemon p<br />
group by chiso<br />
order by chiso asc<br />
limit 10<br />
3. Cho biết điểm trung bình Attack và Defense của mỗi loại Pokemon. Sử dụng Type1.<br />
select type1, avg (attack+defense) as trungbinh<br />
from pokemon p<br />
group by type1<br />
order by trungbinh asc<br />
4.<br />
select name, type1, type2, is_legendary<br />
from pokemon p<br />
where is_legendary=1 and type1=&#8217;Fire&#8217; and type1 and type2<br />
5.<br />
select type1, max(base_total) as lonnhat, avg(base_total) as trungbinh, min(base_total) as nhonhat<br />
from pokemon p<br />
group by type1<br />
6.<br />
select name, (base_total) as chiso<br />
from pokemon p<br />
where not is_legendary<br />
group by name<br />
order by base_total desc<br />
limit 10</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
