일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 코딩공부
- MySQL
- 프로그래머스
- select
- 정규표현식
- node.js
- Where
- 자바스크립트
- 배열
- 개발자_조이킴
- array.slice()
- 코드스테이츠
- 최강의 인생
- 코딩테스트
- array
- 개발자의 책장
- 코플릿
- for문
- Programmers
- join
- 역행자
- array.push()
- 알고리즘
- Developer_JoyKim
- Hackerrank
- SQL
- 재귀함수
- Algorithms
- JavaScript
- 블록체인
Archives
- Today
- Total
CodingSpace
[HackerRank/SQL] Alternative Queries - Draw The Triangle 2 본문
HackerRank/SQL
[HackerRank/SQL] Alternative Queries - Draw The Triangle 2
개발자_조이킴 2022. 7. 22. 08:40Problem. Alternative Queries - Draw The Triangle 2
Link.
https://www.hackerrank.com/challenges/draw-the-triangle-2/problem?isFullScreen=true
Draw The Triangle 2 | HackerRank
Draw the triangle pattern using asterisks.
www.hackerrank.com
Description.
P(R) represents a pattern drawn by Julia in R rows. The following pattern represents P(5):
Write a query to print the pattern P(20).
Key Point.
REPEAT,
My Answer.
SET @number := 0;
SELECT REPEAT('* ', @number := @number + 1)
FROM information_schema.tables
WHERE @number <= 19;
References.
'HackerRank > SQL' 카테고리의 다른 글
[HackerRank/SQL] Aggregation - Weather Observation Station 13 (0) | 2022.07.31 |
---|---|
[HackerRank/SQL] Advanced Select - Binary Tree Nodes (0) | 2022.07.24 |
[HackerRank/SQL] Basic Select - Weather Observation Station 12 (0) | 2022.07.20 |
[HackerRank/SQL] Aggregation - Japan Population (0) | 2022.07.19 |
[HackerRank/SQL] Revising Aggregations - Top Earners (0) | 2022.07.19 |
Comments