Sql问题请教
请高手指点, 感激不尽 在线等。Define a table divisors in which each row describes the number of unique divisors for an integer up to 100. For example, the number 16 has 5 unique divisors: 1, 2, 4, 8, and 16.
create table divisors as
select
-- Example:
select * from divisors limit 20;
-- Expected output:
-- 1|1
-- 2|2
-- 3|2
-- 4|3
-- 5|2
-- 6|4
-- 7|2
-- 8|4
-- 9|3
-- 10|4
-- 11|2
-- 12|6
-- 13|2
-- 14|4
-- 15|4
-- 16|5
-- 17|2
-- 18|6
-- 19|2
-- 20|6