SELECT
dstnum AS t2dstnum,
MAX(calldate) AS t2lastcall
FROM cdr
WHERE route = "out"
GROUP BY dstnum
n:=((x^3)*ln(z)+2*sqr(y)*z)/((abc(x-z)+abc(y-x))^(1/3)+sqr(x)*z)
SELECT
customer_id
FROM table
GROUP BY name
HAVING SUM(is_black=0)=0 AND SUM(is_black=1)!=0
session optional pam_exec.so quiet /usr/bin/pam_ssh
WITH news_images AS (
SELECT news.id news_id, min(images.id) images_id FROM news
LEFT JOIN images ON news.id=images.id
GROUP BY news.id
LIMIT 10
)
SELECT news.*,images.*
FROM news_images
JOIN news ON news.id=news_images.news_id
JOIN images ON images.id=news_images.images_id
SELECT
CASE WHEN status="В наличии" THEN 1
WHEN status="На заказ" THEN 2
WHEN status="Нет в наличии" THEN 3
ELSE null END sort_id,
*
FROM table
$result_array=[];
foreach (array_keys($array1) as $key){
$result_array[$key]=$array2[$key];
}
var_dump($result_array);
Warning: Cannot modify header information - headers already sent by (output started at C:\OSPanel\domains\localhost\scripts\create_user.php:1)
Я не совсем понимаю как правильно написать коммит чтобы понятно было и мне и другим.
WITH check_user as (
SELECT :user_id IN (18,104,1,15) check_id FROM dual
),
main_query as (
SELECT
kpi.id,
GROUP_CONCAT(users_to_groups.user_id) AS test_1,
SUM(:user_id=users_to_groups.user_id) AS test_3
FROM kpi
LEFT JOIN kpi_watchers_groups ON kpi_watchers_groups.kpi_id = kpi.id
LEFT JOIN users_to_groups ON users_to_groups.data_id = kpi_watchers_groups.group_id
GROUP BY kpi.id
)
SELECT
main_query.*,
check_user.check_id test_2
FROM main_query
CROSS JOIN check_user
Знаю что есть некие "шаблоны проектирования" - хочу познакомиться на практике - с какого именно начать?
$search = array('/(\!)+/', '/(\?)+/', '/(\,)+/', '/(\.){4,}/', '/(\.){2}/');