text stringlengths 1 1.05M |
|---|
INSERT INTO `restooking_baza`.`admin`
(
`KIme`,
`Lozinka`,
`Ime`,
`Prezime`,
`Email`,
`KodAdmina`)
VALUES
(
'eAvengers',
'1234',
'eAvengers',
'eAvengers',
'eAvengers@gmail.com',
1234);
INSERT INTO `restooking_baza`.`korisnik`
(
`KIme`,
`Lozinka`,
`Ime`,
`Prezime`,
`Email`)
VALUES
(
'gost',
'6666',
'zabranjeni',
'kor... |
/**
*
* @author mg
* @name multiple_primary_keys_asterisk
*/
SELECT * FROM PUBLIC.MTD_MDCHNGLOG T_MTD_MDCHNGLOG_1, PUBLIC.MTD_ENTITIES T_MTD_ENTITIES
|
--
-- note: this script assumes pg_hba.conf is configured correctly
--
-- \connect postgres postgres
drop database if exists hibernate;
drop user if exists hibuser;
CREATE USER hibuser PASSWORD 'password';
CREATE DATABASE hibernate WITH OWNER = hibuser ENCODING = 'UTF8' TABLESPACE = pg_default;
GRANT ALL PRIVILEGE... |
CREATE TABLE `words_negative` (
`word` varchar(100) NOT NULL,
PRIMARY KEY (`word`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
-- ----------------------------
-- 1、部门表
-- ----------------------------
drop table if exists sys_dept;
create table sys_dept (
dept_id bigint(20) not null auto_increment comment '部门id',
parent_id bigint(20) default 0 comment '父部门id',
ancestors varchar(50) ... |
-- Revert monitor-db:checks from pg
BEGIN;
DROP TABLE monitor.checks;
COMMIT;
|
INSERT INTO `sys_parameters` (
`parameter_code`, `parameter_value`,
`parameter_type`, `description`, `record_status`, `creator_id`, `created`,
`updater_id`, `modified`)
VALUES (
'email.reminder_enabled', 'true', 'B',
'Enable email reminder feature', 'A', 0, NOW(), NULL, NOW()
); |
-- Convert schema '/home/melmoth/amw/AmuseWikiFarm/dbicdh/_source/deploy/24/001-auto.yml' to '/home/melmoth/amw/AmuseWikiFarm/dbicdh/_source/deploy/25/001-auto.yml':;
;
BEGIN;
;
SET foreign_key_checks=0;
;
CREATE TABLE `bookbuilder_profile` (
`bookbuilder_profile_id` integer NOT NULL auto_increment,
`user_id` in... |
SELECT COUNT(*) FROM Person.Person -- 19972
SELECT COUNT(*) FROM HumanResources.Employee -- 290
SELECT COUNT(*) FROM Person.Person p -- 19682
WHERE NOT EXISTS (
SELECT NULL FROM HumanResources.Employee e
WHERE e.BusinessEntityID = p.BusinessEntityID
)
SELECT COUNT(*) FROM HumanResources.Employee e -- 0
WHERE NOT EX... |
-- MySQL Script generated by MySQL Workbench
-- Sun Sep 10 17:37:10 2017
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR... |
ALTER EVENT SESSION [TimeOuts] ON SERVER STATE = STOP
GO
DROP EVENT SESSION [TimeOuts] ON SERVER
GO
CREATE EVENT SESSION [TimeOuts] ON SERVER
ADD EVENT sqlserver.rpc_completed(SET collect_output_parameters=(1)
ACTION(sqlserver.client_app_name,sqlserver.client_hostname,sqlserver.database_name,sqlserver.is_system,s... |
-- file:plpgsql.sql ln:1068 expect:false
sltype := substr(psrec.slotlink, 1, 2)
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th9 25, 2018 lúc 01:25 AM
-- Phiên bản máy phục vụ: 10.1.30-MariaDB
-- Phiên bản PHP: 5.6.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
BEGIN;
\echo Creating tables...
CREATE SCHEMA instapredict;
CREATE TABLE instapredict.departments (
department_id integer PRIMARY KEY,
department varchar(264)
);
CREATE TABLE instapredict.aisles (
aisle_id integer PRIMARY KEY,
aisle varchar(264)... |
SELECT SUM (n.n_nationkey)
FROM nation AS n, region AS r
WHERE (r.r_regionkey = n.n_regionkey) AND (n.n_name = 'UNITED STATES')
|
CREATE VIEW dbo.vwBudgetGroupCategoryLine
AS
SELECT a.BudgetGroupID, a.BudgetGroupName, a.BudgetGroupDesc,
b.BudgetCategoryID, b.BudgetCategoryName, b.BudgetCategoryDesc,
c.BudgetLineID, c.BudgetLineName, c.BudgetLineDesc, c.IsAccrued,
IsCashOffset,
CASE WHEN a.BudgetGroupName = 'Assets' THEN 1 ELSE 0 ... |
-- packages/acs-kernel/sql/upgrade/upgrade-4.2-4.5.sql
--
-- @author vinod@kurup.com
-- @creation-date 2002-05-15
-- @cvs-id $Id: upgrade-4.2-4.5.sql,v 1.2 2002/08/17 17:42:45 vinodk Exp $
--
-- fixes bug #1515 http://openacs.org/sdm/one-bug.tcl?baf_id=1515
drop function apm_package_version__upgrade_p (varchar,varcha... |
with source as (
select *
from {{ ref('stg_twitter_ads__tweet_url_tmp') }}
),
renamed as (
select
{{
fivetran_utils.fill_staging_columns(
source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__tweet_url_tmp')),
staging_columns=get_tw... |
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/... |
CREATE PROCEDURE [core].[base_Migration_Add]
@id uniqueidentifier
AS
INSERT INTO [Migrations]([Id]) VALUES(@id) |
-- liquibase formatted sql
-- changeset Lang:f-settlement-item-1
DROP TABLE IF EXISTS `F_SETTLEMENT_ITEM`;
CREATE TABLE `F_SETTLEMENT_ITEM`
(
`KEY` VARCHAR(36) COMMENT '「key」- 结算单明细主键',
`NAME` VARCHAR(255) NOT NULL COMMENT '「name」 - 明细名称',
`CODE` VARCHAR(255) NOT NULL COMME... |
UPDATE ranks set ranks.vote =
(
SELECT IFNULL(SUM(pollstats.total), 0) FROM pollstats WHERE pollstats.post_id = ranks.post_id
); |
CREATE TABLE `jdcard_buyback_mobile` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '京东卡回购手机列表',
`mobile` varchar(13) NOT NULL DEFAULT '0' COMMENT '手机号',
`admin_id` int(10) NOT NULL DEFAULT '0' COMMENT '操作人',
`add_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFA... |
CREATE SCHEMA Data538
AUTHORIZATION dbo
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Data538].[Charlotte](
[city] [nvarchar](256) NULL DEFAULT('Charlotte'),
[weatherstationcode] [nvarchar](6) NULL DEFAULT('KCLT'),
[state] [nvarchar](2) NULL DEFAULT('NC'),
[date] [nvarchar](60) NULL,
[actual_mea... |
alter table material_required
add column review_message varchar(500) default null;
alter table material_supplied
add column review_message varchar(500) default null; |
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Sep 05, 2021 at 10:31 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
USE [testDB]
GO
CREATE SCHEMA [PPS]
GO
CREATE SCHEMA [SSSB]
GO
CREATE TYPE [PPS].[UT_Parameter] AS TABLE(
[paramID] [int] IDENTITY(1,1) NOT NULL,
[name] [nvarchar](100) NOT NULL,
[value] [nvarchar](max) NOT NULL,
PRIMARY KEY CLUSTERED
(
[paramID] ASC
)WITH (IGNORE_DUP_KEY = OFF)
)
GO
SET ANSI_NULLS ON
GO
SET QUOT... |
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: consultas
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.26-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... |
insert into users values('admin',true,'{noop}admin');
insert into users values('user',true,'{noop}user');
insert into authorities values('admin','ROLE_ADMIN');
insert into authorities values('user','ROLE_USER');
insert into sahip values(1,'Serkan','Avcılar/İstanbul','serkankayatr@hotmail.com','Kaya','+905374806535');... |
CREATE TABLE dpe_group
(
id INT AUTO_INCREMENT
PRIMARY KEY,
name VARCHAR(20) NULL
COMMENT '组名',
CONSTRAINT group_id_uindex
UNIQUE (id)
)
COMMENT '分组'
ENGINE = InnoDB
CHARSET = utf8; |
CREATE TABLE list (id VARCHAR(64) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "list" ("id", "value") VALUES ('az', 'აზერბაიჯანული');
INSERT INTO "list" ("id", "value") VALUES ('az_AZ', 'აზერბაიჯანული (აზერბაიჯანი)');
INSERT INTO "list" ("id", "value") VALUES ('az_Cyrl_AZ', 'აზერბაიჯანული (კირილ... |
-- This SQL code was generated by sklearn2sql (development version).
-- Copyright 2018
-- Model : CaretClassifier_nnet
-- Dataset : iris
-- Database : teradata
-- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
-- Model deployment code
WITH "IL" AS
(SELECT... |
SELECT (butsparequipe(nom)).pays, (butsparequipe(nom)).total
FROM pays;
|
ALTER TABLE
sims.education_programs_offerings
ADD
COLUMN IF NOT EXISTS offering_type sims.offering_types NOT NULL DEFAULT 'Public';
-- Removing the dummy constraint created just to allow us
-- to add a "NOT NULL" column in an exising table.
ALTER TABLE
sims.education_programs_offerings
ALTER COLUM... |
{#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2017, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#}
{% import 'systemobjects.macros' as SYSOBJECTS %}
SELECT t.oid,
t.typname AS name,
nsp.nspname as schema,
nsp.oid AS schemaoid,
{{ SY... |
-- uniCenta oPOS - Touch Friendly Point Of Sale
-- Copyright (C) 2009-2015 uniCenta
-- http://www.unicenta.net
--
-- This file is part of uniCenta oPOS.
--
-- uniCenta oPOS is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-... |
DROP TABLE IF EXISTS pastes |
CREATE FUNCTION [dbo].[dnn_AdjustedReferrer](
@Referrer nVarChar(2000),
@PortalAlias nVarChar( 255)
)
RETURNS nVarChar(2000)
AS
BEGIN
RETURN CASE
WHEN @Referrer LIKE '%' + @PortalAlias + '%' THEN Null
ELSE @Referrer
END
END
|
IF SUSER_ID('cerbos_user') IS NULL
CREATE LOGIN cerbos_user WITH PASSWORD = 'ChangeMe(1!!)';
GO
IF NOT EXISTS (
SELECT [name]
FROM sys.databases
WHERE [name] = N'cerbos'
)
CREATE DATABASE cerbos;
GO
USE cerbos;
IF OBJECT_ID('[dbo].[policy]', 'U') IS NULL
CREATE TABLE [dbo].[policy] (
id BIGI... |
-- Table: bloomreadertest.clone_preview
-- DROP TABLE bloomreadertest.clone_preview;
CREATE TABLE bloomreadertest.clone_preview
(
id character varying(1024) COLLATE pg_catalog."default" NOT NULL,
received_at timestamp with time zone,
uuid_ts timestamp with time zone,
anonymous_id text COLLATE pg_catal... |
-- Project 3001 hook
INSERT INTO
project_webhook (
id,
creator_id,
updater_id,
project_id,
type,
name,
url,
activity_list
)
VALUES
(
4101,
101,
101,
3001,
'bb.plugin.webhook.wecom',
'WeCom',
... |
USE [Certificate_Administration]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- ======================================================================
-- Author: John Merkel
-- Creation date: October 18, 2021
-- Description:
-- Return:
-- Requires: SA
-- =======================... |
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 04 Okt 2016 pada 04.11
-- Versi Server: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4... |
/*
* CreateTable.sql
* Swift Auto-Updater
* Create Auto-Updater Table
*/
CREATE TABLE REVISIONS (
RevTag CHAR(7) NOT NULL,
Package VARCHAR(255) NOT NULL,
Timestamp TIMESTAMP NOT NULL,
CONSTRAINT PRIMARY KEY (RevTag)
);
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 17, 2020 at 11:47 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.2.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
INVALID TEST
AddAutoIncrement is not suppoted for MSSQL
-- https://docs.liquibase.com/change-types/community/add-auto-increment.html |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th8 17, 2020 lúc 06:59 AM
-- Phiên bản máy phục vụ: 10.4.11-MariaDB
-- Phiên bản PHP: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
DELETE FROM script_texts WHERE entry BETWEEN -1000588 AND -1000582;
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
(-1000582,'Help! Please, You must help me!',0,0,0,0,'Galen - periodic say'),
(-1000583,'Let us leave this place.',0,0,0,0,'Galen - quest accepted'),
(-1000584,'Lo... |
CREATE LOGIN jobcred WITH PASSWORD = 'Strongpassw0rd';
GO
|
--
-- DIRBS SQL migration script (v36 -> v37)
--
-- Copyright (c) 2018-2021 Qualcomm Technologies, Inc.
--
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the
-- limitations in the disclaimer below) provided that the following cond... |
create or replace package MiscConsts is
CompositeStringDelimiter constant Varchar2(1 char) := '~';
SNull constant Varchar2(4 char) := 'null';
end;
/
create or replace package body MiscConsts is
-- nothing here
end;
/
|
CREATE DATABASE IF NOT EXISTS `SAM` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `SAM`;
-- MySQL dump 10.13 Distrib 5.5.46, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: SAM
-- ------------------------------------------------------
-- Server version 5.5.46-0ubuntu0.12.04.2
/*!40101 SET @OLD_CHARA... |
/*
Navicat MySQL Data Transfer
Source Server : brainsoftbd
Source Server Version : 50156
Source Host : localhost:3306
Source Database : brainsof_bd
Target Server Type : MYSQL
Target Server Version : 50156
File Encoding : 65001
Date: 2011-11-17 14:45:38
*/
SET FOREIG... |
DROP TABLE test ON CLUSTER test_cluster;
|
USE devops_ci_project;
SET NAMES utf8mb4;
DROP PROCEDURE IF EXISTS ci_project_schema_update;
DELIMITER <CI_UBF>
CREATE PROCEDURE ci_project_schema_update()
BEGIN
DECLARE db VARCHAR(100);
SET AUTOCOMMIT = 0;
SELECT DATABASE() INTO db;
IF NOT EXISTS(SELECT 1
FROM information_schema... |
@DROP INDEX url_idx;
CREATE INDEX url_idx on {PREFIX}suppress (host, ip);
|
/*
* Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
;
drop schema if exists pg_catalog;
create schema pg_catalog;
drop alias if exists pg_convertTyp... |
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- Create table
--
CREATE TABLE sync2_co_compr_part_zlib_1
(id SERIAL,a1 int,a2 char(5),a3 numeric,a4 boolean DEFAULT false ,a5 char DEFAULT 'd',a6 text,a7 timestamp,a8 character varying(705),a9 bigint,a10 date,a11 varchar(600... |
--Daniel García Molero
--1. Listado de empleados (con toda la información disponible) de los empleados que trabajan en el departamento cuyo identificador es 50.
--##Algebra relacional
distinct (select department_id = 50 (employees));
--##SQL
SELECT DISTINCT * FROM employees WHERE (employees.department_id=50);
... |
-- CreateTable
CREATE TABLE "User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"email" TEXT NOT NULL,
"name" TEXT,
"password" TEXT NOT NULL,
"token" TEXT
);
-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
-- CreateIndex
CREATE UNIQUE INDEX "User_token_key" ON "User"(... |
CREATE TABLE [dbo].[CategoriasCabys](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Codigo] [int] NOT NULL,
[Descripcion] [varchar](255) NOT NULL,
CONSTRAINT [PK_CategoriasCabys] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LO... |
CREATE TABLE QRTZ_JOB_DETAILS
(
SCHED_NAME VARCHAR(120) NOT NULL,
JOB_NAME VARCHAR(200) NOT NULL,
JOB_GROUP VARCHAR(200) NOT NULL,
DESCRIPTION VARCHAR(250) NULL,
JOB_CLASS_NAME VARCHAR(250) NOT NULL,
IS_DURABLE VARCHAR(1) NOT NULL,
IS_NONCONCURRENT VARCHAR(1) N... |
SELECT * FROM psdb.employees WHERE emp_no >= 14037 AND emp_no <= 14047; |
CREATE SEQUENCE plant_maintenance_sq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
CREATE TABLE plant_maintenance (
id bigint DEFAULT nextval('plant_maintenance_sq'::regclass) NOT NULL,
device_id bigint NOT NULL,
date_time TIMESTAMP without time zone NOT NULL,
mainten... |
INVALID TEST
-- It is not possible to test createFunction change type with current test-harness build. H2 supports only Java/JQQQ written
-- functions which should be passed to a database classpath (which is currently dockerized) |
SET DEFINE OFF;
CREATE UNIQUE INDEX AFW_13_TUTRL_UK1 ON AFW_13_TUTRL
(CODE, DNR_REF_PRODT)
LOGGING
/
|
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: db5000995754.hosting-data.io
-- Generation Time: Oct 24, 2020 at 10:28 PM
-- Server version: 5.7.30-log
-- PHP Version: 7.0.33-0+deb9u10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00... |
#standardSQL
# meta open graph video types
# returns all the data we need from _almanac
CREATE TEMPORARY FUNCTION get_meta_og_video_types(almanac_string STRING)
RETURNS STRUCT<
video_types ARRAY<STRING>
> LANGUAGE js AS '''
var result = {};
try {
var almanac = JSON.parse(almanac_string);
if (Array.isArray(a... |
set client_min_messages to warning;
create extension if not exists pgtap;
reset client_min_messages;
begin;
select plan(17);
truncate table ggircs_portal.ciip_application_wizard cascade;
-- Table exists
select has_table(
'ggircs_portal', 'ciip_application_wizard',
'ggircs_portal.ciip_application_wizard should ex... |
-- This program is open source, licensed under the MIT License.
-- For license terms, see the LICENSE file.
--
-- Copyright (C) 2019: Mark Teper
CREATE FUNCTION slice(anyarray, integer[]) RETURNS anyarray LANGUAGE C STRICT IMMUTABLE LEAKPROOF COST 100 PARALLEL SAFE AS '$libdir/numpgsql', 'slice_idx';
CREATE FUNCTION s... |
-- @testpoint: 插入错误值,合理报错
-- @modify at: 2020-11-04
--创建表
DROP TABLE IF EXISTS type_bit03;
CREATE TABLE type_bit03 (name bit(3));
--插入数据
insert into type_bit03 values (B'201');
--插入失败,查看数据
select * from type_bit03;
--清理环境
drop table type_bit03; |
{% macro get_customers_columns() %}
{% set columns = [
{"name": "_fivetran_deleted", "datatype": "boolean"},
{"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()},
{"name": "city", "datatype": dbt_utils.type_string()},
{"name": "companyname", "datatype": dbt_utils.type_string()},
{"n... |
--film tablosunda bulunan tüm sütunlardaki verileri replacement cost değeri 12.99 dan büyük eşit ve 16.99 küçük olma koşuluyla sıralayınız ( BETWEEN - AND yapısını kullanınız.)
select * from film where replacement_cost between 12.99 and 16.99
--actor tablosunda bulunan first_name ve last_name sütunlardaki verileri fi... |
SELECT * FROM Album;
-- every album by "Various Artists", without joins
SELECT ArtistId
FROM Artist
WHERE Name = 'Various Artists';
-- ...now that i know it's 21
SELECT *
FROM Album
WHERE ArtistId = 21;
-- every album by artist starting with letter A (incomplete)
SELECT ArtistId
FROM Artist
WHERE Name < 'B';
--WHERE ... |
SELECT
leitung.t_id,
leitung.t_id AS id,
leitung.einbaujahr AS baujahr,
leitung.geometrie,
leitung.funktion AS funktion,
leitung.material AS material,
CASE
WHEN leitung.material::text = 'unbekannt'::text THEN 'u'::text
WHEN leitung.material::text = 'Faserzement.Faserzeme... |
-- ----------------------------------------
-- -- CLEAR DOWN THE TABLE --
-- ----------------------------------------
TRUNCATE TABLE `game_tele`;
-- ----------------------------------------
-- MySQL dump 10.13 Distrib 5.5.37, for Win32 (x86)
--
-- Host: localhost Database: mangos0
-- ------------... |
-- Below are a bunch of "plain English" sentences. Your job is to take a stab
-- at translating each one into a single SELECT query. You can write your
-- query below each "plain English" sentence.
--
-- We've written some example queries as a way to both show you how and where
-- to type your work and also as a way ... |
create extension if not exists hstore;
create extension if not exists citext;
drop schema if exists p cascade;
create schema p;
create table p.parent (
id serial primary key,
"name" text not null
);
create table p.forward (
id serial primary key,
"name" text not null
);
create table p.forward_compound (
... |
--
-- Schema to deploy PG-Strom objects
--
CREATE SCHEMA IF NOT EXISTS pgstrom;
--
-- pg_strom installation queries
--
CREATE TYPE __pgstrom_device_info AS (
id int4,
property text,
value text
);
CREATE FUNCTION pgstrom_device_info()
RETURNS SETOF __pgstrom_device_info
AS 'MODULE_PATHNAME'
LANGUAGE C STR... |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for T_User
-- ----------------------------
DROP TABLE IF EXISTS `T_User`;
CREATE TABLE `T_User` (
`Id` bigint(20) NOT NULL AUTO_INCREMENT,
`UserName` varchar(100) NOT NULL,
`Password` varchar(255) NOT NULL,
`Status` smallint(6) NOT NU... |
ALTER TABLE step_gnirs ALTER COLUMN exposure_time TYPE bigint;
|
-- This query generated by script/generate_corr_queries.py and should probably not be
-- modified manually. Instead, make changes to that script and rerun it.
WITH
raw_effect_sizes AS (
SELECT
state_user_v_peer_open,
business_type,
COUNT(*) AS campaign_count
-- The following is the sl... |
/*
Copyright 2018 Cisco and its affiliates
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... |
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml
-- @product_version gpdb: [4.3-]
-- @gucs gp_autostats_mode=none;test_print_direct_dispatch_info=true
-- @db_name dmldb
-- @description Negative test for direct dispatch
\echo --start_ignore
set gp_enable_column_oriented_... |
CREATE TABLE `album_hot_music` (
`id` int(11) NOT NULL,
`song_id` int(11) NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `album_list` (
`id` int(11) NOT NULL,
`song_id` int(11) NOT NULL COMMENT '歌曲ID',
`name` varchar(256) NOT NULL COMMENT '歌曲名称',
`au... |
{% if postgres_db != 'postgres' %}
CREATE DATABASE "{{ postgres_db }}";
{% endif %}
{% if postgres_user == 'postgres' %}
ALTER USER postgres with SUPERUSER {{ postgres_pass }};
{% else %}
CREATE USER "{{ postgres_user }}" WITH SUPERUSER PASSWORD '{{ postgres_pass }}';
{% endif %}
|
DROP TABLE IF EXISTS customers CASCADE;
DROP TABLE IF EXISTS addresses CASCADE;
DROP TABLE IF EXISTS streets CASCADE;
CREATE TABLE streets(
id INT PRIMARY KEY
);
CREATE TABLE addresses(
id INT PRIMARY KEY,
street INT,
FOREIGN KEY (street) REFERENCES streets(id)
);
CREATE TABLE customers(
id INT PRIMARY KEY... |
CREATE TABLE #Codesets (
codeset_id int NOT NULL,
concept_id bigint NOT NULL
)
;
INSERT INTO #Codesets (codeset_id, concept_id)
SELECT 0 as codeset_id, c.concept_id FROM (select distinct I.concept_id FROM
(
select concept_id from @vocabulary_database_schema.CONCEPT where concept_id in (40487536)
UNION select c... |
SELECT c11.col1, c22.col2 FROM table c11, table c22 WHERE value='nothing' |
-- @testpoint:openGauss保留关键字union同时作为表名和列名带引号,并进行dml操作,union列的值最终显示为1000
drop table if exists "union";
create table "union"(
c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer,
c_real real, c_double real,
c_decimal decimal(38), c_number number(38), c_numeric numeric(38),
c_char cha... |
--Create manage notes role
INSERT INTO KRIM_PERM_T (PERM_ID, OBJ_ID, VER_NBR, PERM_TMPL_ID, NMSPC_CD, NM, DESC_TXT, ACTV_IND)
VALUES (KRIM_PERM_ID_S.NEXTVAL, SYS_GUID(), 1, (SELECT PERM_TMPL_ID FROM KRIM_PERM_TMPL_T WHERE NMSPC_CD = 'KC-IDM' and NM = 'View Document Section'), 'KC-PROTOCOL',
'Maintain Protocol Notes... |
#standardSQL
# % of pages using each link protocol
CREATE TEMPORARY FUNCTION getUsedProtocols(payload STRING)
RETURNS ARRAY<STRING> LANGUAGE js AS '''
try {
const almanac = JSON.parse(payload);
return Object.keys(almanac.link_protocols_used);
} catch (e) {
return [];
}
''';
SELECT
_TABLE_SUFFIX AS client,
tot... |
-- start query 1 in stream 0 using template query18.tpl
select i_item_id,
ca_country,
ca_state,
ca_county,
avg( cast(cs_quantity as decimal(12,2))) agg1,
avg( cast(cs_list_price as decimal(12,2))) agg2,
avg( cast(cs_coupon_amt as decimal(12,2))) agg3,
avg( cast(c... |
SELECT ens.company, ens.state, ens.zip_code, ens.complaint_count
FROM (select company, state, zip_code, count(complaint_id) AS complaint_count
FROM credit_card_complaints
WHERE state IS NOT NULL
GROUP BY company, state, zip_code) ens
INNER JOIN
(SELECT ppx.company, max(ppx.complaint_count) AS complaint_count
... |
DROP TABLE IF EXISTS hackers CASCADE;
CREATE TABLE hackers
(
id serial NOT NULL,
nickname char(16),
quiz_id integer,
answers varchar(256)
);
-- Column id is associated with sequence public.hackers_id_seq
ALTER TABLE hackers
ADD CONSTRAINT hackers_pkey
PRIMARY KEY (id);
COMMIT;
... |
\echo 'No functions in drivestat database' |
create procedure [core].[utm_campaign_target_web_level6_sync]
as begin
set nocount on
declare @mt_dt datetime2(0) = sysdatetime()
declare @load_dt datetime2(0) = dateadd(dd, -3, @mt_dt)
drop table if exists #utm_campaign_target_web_level6
create table #utm_campaign_target_web_level6 (
utm_key bigint not null,... |
EXPLAIN SELECT customers.name,order_date,sku,quan FROM customers,orders,items WHERE customers.cid = orders.cid AND orders.oid = items.oid AND items.sku < '8888'
|
CREATE PROCEDURE SP387(OUT MYCOUNT INTEGER) SPECIFIC SP387_78405 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE11;SELECT COUNT(*)INTO MYCOUNT FROM TABLE194;SELECT COUNT(*)INTO MYCOUNT FROM TABLE250;SELECT COUNT(*)INTO MYCOUNT FROM ... |
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.