SELECT DATE(`t`.`state_at`) AS `date`, `t`.`value`
FROM (
SELECT MAX(`state_at`) AS `max`
FROM `table`
GROUP BY DATE(`state_at`)
) AS `m`
JOIN `table` AS `t`
ON `t`.`state_at` = `m`.`max`
SELECT DISTINCT
DATE(FIRST_VALUE(`state_at`) OVER `win`) AS `date`,
FIRST_VALUE(`value`) OVER `win` AS `value`
FROM `table`
WINDOW `win` AS (
PARTITION BY DATE(`state_at`)
ORDER BY `state_at` DESC
)
async function getChannel(urlChannel){
const urlChannelResult = await fetch(urlChannel)
const jsonChannel = await urlChannelResult.json()
const authorPhoto = jsonChannel.items[0].snippet.thumbnails.high.url
console.log(authorPhoto
return authorPhoto
}
[...].map(async el => {
const authorPhoto = await getChannel(el.url)
// ....
})
<template>
<div>
<q-btn
v-bind="$attrs"
@click="show = true"
></q-btn>
<q-dialog v-model="show">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum repellendus sit voluptate voluptas eveniet porro. Rerum blanditiis perferendis totam, ea at omnis vel numquam exercitationem aut, natus minima, porro labore.
</p>
<q-btn
label="OK"
@click="show = false"
/>
</q-dialog>
</div>
</template>
<script>
export default {
inheritAttrs: false,
data () {
return {
show: false
}
}
}
</script>
/articles/index.vue - просмотр списка статей
/articles/create.vue - создать статью
/articles/view.vue - смотреть статью
/articles/edit.vue - редактировать статью
{path: '/articles', component: './articles/index.vue'}
{path: '/articles/create', component: './articles/create.vue'}
{path: '/articles/:id', component: './articles/view.vue'}
{path: '/articles/:id/edit', component: './articles/edit.vue'}