> For the complete documentation index, see [llms.txt](https://dshub.gitbook.io/ds-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dshub.gitbook.io/ds-hub/sql/sql-practice/popular-websites-for-sql-practice/hackerrank/sql-advanced/draw-the-triangle-1.md).

# Draw The Triangle 1

[Question Link](https://www.hackerrank.com/challenges/draw-the-triangle-1/problem?isFullScreen=false)

*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)*.

```sql
SET @i = 21;
SELECT 
    REPEAT('* ', @i := @i-1) 
FROM information_schema.tables;
```
