Sql как группировать столбец без потери данных

Просто добавьте что-то примечательное здесь.


myQueue.hpp:

template <class T> 
class QueueA {
    int size;
    ...
public:
    template <class T> T dequeue() {
       // implementation here
    }

    bool isEmpty();

    ...
}    

myQueue можно определить методы шаблонного класса, которые просто прекрасны в файле реализации. cpp:

// implementation of regular methods goes like this:
template <class T> bool QueueA<T>::isEmpty() {
    return this->size == 0;
}


main()
{
    QueueA<char> Q;

    ...
}
0
задан Brian Tompsett - 汤莱恩 13 July 2018 в 17:38
поделиться

1 ответ

Это сложно. В принципе, идея - это неволю и повторный поворот, но с завихрением:

select t.id,
       max(case when which = 'codeTaxe1' then val end) as codeTaxe1,
       max(case when which = 'codeTaxe2' then val end) as codeTaxe2,
       . . . 
from t cross apply
     (select v.*, row_number() over (order by (select null)) as seqnum
      from (values (t.codeTaxe1, 'codeTaxe1'), (t.codeTaxe2, 'codeTaxe2'), . . .
           ) v(val, which)
      where val is not null
     ) tt
group by t.id, seqnum;
0
ответ дан Gordon Linoff 17 August 2018 в 12:22
поделиться
Другие вопросы по тегам:

Похожие вопросы: