SELECT "t".*,
(SELECT COUNT(*) FROM "user_archive_view" WHERE user_tariff_id = t.id) AS "count_archive"
FROM "user_tariff" "t"
HAVING (SELECT COUNT(*) FROM "user_archive_view" WHERE user_tariff_id = t.id) = '100';
SELECT *
FROM wp_postmeta
WHERE post_id in (
SELECT id FROM wp_posts p
LEFT JOIN wp_term_relationships r ON p.ID =r.object_id
LEFT JOIN wp_term_taxonomy t ON r.term_taxonomy_id = t.term_taxonomy_id
WHERE p.post_type = 'water'
AND t.taxonomy = 'menu'
AND t.term_id = 22
)
AND meta_value LIKE "field\_%" AND meta_key LIKE "%sku%"
SELECT c.*
FROM clients c
LEFT JOIN traffic t ON t.client_id = c.id
WHERE t.arriving_date ISNULL
SELECT c.*
FROM clients c
LEFT JOIN traffic t ON t.id_client = c.id
LEFT JOIN managers m ON t.id_manager = m.id
WHERE m.name = 'Наталья'
SELECT t.id_client,
count(*)
FROM traffic t
GROUP BY id_client
computed: {
filteredDialogs: function () {
let filtered = [...this.dialogs]
return this.search === ''
? filtered
: filtered.filter(c => c.fullname.toLowerCase().indexOf(this.search.toLocaleLowerCase()) > -1)
}
},
const news = posts.map(p => ({ ...p, user: users.find(u => p.userId === u.id) }))
vm.markers = response.data.data.map(m => {
return {
name: m.name,
address: m.address,
position: { lat: m.lat, lng: m.lng }
}
})
<carousel @changed="changed" @updated="updated">
router.beforeEach((to, from, next) => {
const currentUser = localStorage.getItem("auth");
if (currentUser && to.path !== '/panel' ) {
next("panel");
} else {
next();
}
});