# Q for examples - Simple Structural transforms

**URL:** <https://forum.kx.com/t/q-for-examples-simple-structural-transforms/12110>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [February 7, 2021, 10:52am UTC](https://forum.kx.com/t/q-for-examples-simple-structural-transforms/12110 "2021-02-07T10:52:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eletrofone1](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@eletrofone1](https://forum.kx.com/u/eletrofone1)\
**Post date:** [February 7, 2021, 10:52am UTC](https://forum.kx.com/t/q-for-examples-simple-structural-transforms/12110/1 "2021-02-07T10:52:00Z")

</div>

Good Morning!

Due to a lot of work at the beginning of the year, I had to slow down the study pace.

I am currently at:

[https://code.kx.com/q/learn/q-by-examples/](https://code.kx.com/q/learn/q-by-examples/)

Topic: Structural transforms

I was able to understand all the examples, except:

q) 0 3 \_ /: 2 6 # til 12

0 1 2&nbsp; &nbsp; &nbsp;3 4 5

6 7&nbsp; &nbsp; &nbsp;8&nbsp; &nbsp; &nbsp;9 10 11

I understand the function of each one separated: \_&nbsp; &nbsp;/:&nbsp; &nbsp;#&nbsp; &nbsp;and&nbsp; &nbsp;til

But together, I expected another result.

I thank you for your help.

---

<div class="post-metadata">

**Author:** ![eletrofone1](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@eletrofone1](https://forum.kx.com/u/eletrofone1)\
**Post date:** [February 7, 2021, 11:12am UTC](https://forum.kx.com/t/q-for-examples-simple-structural-transforms/12110/2 "2021-02-07T11:12:00Z")

</div>

Guys, I actually got it.

But my doubt is because the number 8 is displayed separately from the others.

q) show N: 0 3 \_ /: 2 6 # til 12

0 1 2&nbsp; &nbsp; 3 4 5

6 7&nbsp; &nbsp; 8&nbsp; &nbsp; 9 10 11

Observe the result of this command:

q) (N 1) 0

6 7 8

This is how I expected the result:

0 1 2&nbsp; &nbsp; &nbsp;3 4 5

6 7 8&nbsp; &nbsp; &nbsp;9 10 11

(Just a visual detail)

Thanks again to all!

Em domingo, 7 de fevereiro de 2021 às 08:05:31 UTC-3, Geraldo M Melo Jr escreveu:

> Good Morning!
> 
> Due to a lot of work at the beginning of the year, I had to slow down the study pace.
> 
> I am currently at:
> 
> https://code.kx.com/q/learn/q-by-examples/
> 
> Topic: Structural transforms
> 
> I was able to understand all the examples, except:
> 
> q) 0 3 \_ /: 2 6 # til 12
> 
> 0 1 2&nbsp; &nbsp; &nbsp;3 4 5
> 
> 6 7&nbsp; &nbsp; &nbsp;8&nbsp; &nbsp; &nbsp;9 10 11
> 
> I understand the function of each one separated: \_&nbsp; &nbsp;/:&nbsp; &nbsp;#&nbsp; &nbsp;and&nbsp; &nbsp;til
> 
> But together, I expected another result.
> 
> I thank you for your help.

---

<div class="post-metadata">

**Author:** ![konq1](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@konq1](https://forum.kx.com/u/konq1)\
**Post date:** [February 7, 2021, 3:14pm UTC](https://forum.kx.com/t/q-for-examples-simple-structural-transforms/12110/3 "2021-02-07T15:14:00Z")

</div>

q)a:0 3 \_/: 2 6 # til 12

8 is shifted by a space to be aligned with 11

q)a 1

6 7 8

9 10 11

&nbsp; Konstantin

---

<div class="post-metadata">

**Author:** ![eletrofone1](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@eletrofone1](https://forum.kx.com/u/eletrofone1)\
**Post date:** [February 8, 2021, 6:24pm UTC](https://forum.kx.com/t/q-for-examples-simple-structural-transforms/12110/4 "2021-02-08T18:24:00Z")

</div>

Boa tarde!  
Muito obrigado pela ajuda e atenção.

Em dom, 7 de fev de 2021 12:14, Konstantin Orman \<konstantin.orman@gmail.com\> escreveu:

> q)a:0 3 \_/: 2 6 # til 12
> 
> 8 is shifted by a space to be aligned with 11
> 
> q)a 1
> 
> 6 7 8
> 
> 9 10 11
> 
> &nbsp; Konstantin
