sql stringlengths 6 1.05M |
|---|
INSERT INTO `wp_wpgrabber` VALUES('', 'test 5 - download.cnet.com (пример html-ленты с переводом англ > рус )', 'html', 'http://download.cnet.com/download-blog/?tag=bc', 'http://download\\.cnet\\.com/[\\d-_]{5,}/\\S{1,}/', '<meta name="twitter:title" content="(.*?)"/>', '<div class="postBody txtWrap" section="txt" >', ... |
<gh_stars>1000+
-- 11.11.2015 11:07
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_EntityType (AD_Client_ID,AD_EntityType_ID,AD_Org_ID,Created,CreatedBy,Description,EntityType,Help,IsActive,ModelPackage,Name,Processing,Updated,UpdatedBy) VALUES (0,54075,0,TO_TIMESTAMP('2015-11-11 11:0... |
drop materialized view if exists ofec_electioneering_mv_tmp;
create materialized view ofec_electioneering_mv_tmp as
select
row_number() over () as idx,
electioneering_com_vw.*,
image_pdf_url(sb_image_num) as pdf_url,
to_tsvector(disb_desc) as purpose_description_text
from electioneering_com_vw
where rpt... |
delete from edges;
insert into edges(child, parent)
values
('A', 'root')
,('A', 'root')
,('B', 'root')
,('C', 'A')
,('E', 'B')
,('D', 'B')
,('E', 'C')
,('F', 'D')
,('G', 'E')
,('G', 'F')
;
|
SET SQL_SAFE_UPDATES=0;
DELETE FROM orders_products;
DELETE FROM products;
DELETE FROM orders;
DELETE FROM accounts;
INSERT INTO products VALUES
('010ce3c5-fd83-4dba-a223-dd535515c17d', 'Potato'),
('4d341b47-22b8-4622-b19c-473c90d9b3f5', 'Carrot'),
('f0b5d037-3eb1-4782-9f07-ac43beb33de6', 'Onion'),
('949c4aed-... |
create table dbo.t_sink (
c_identity integer identity ,
c_smallint smallint,
c_integer integer,
c_bigint bigint,
c_decimal decimal(30,15),
c_numeric numeric(30,15),
c_real real,
c_double double precision,
c_money money,
c_varchar nvarchar(10),
c_char char(2),
c_text nvarc... |
<filename>day2/solutions.sql
-- Solution Day 2: Part 1
with net_movement as (
select sum(case when movement = 'forward' then move else 0 end) as horizontal,
sum(case when movement = 'down' then move else 0 end) -
sum(case when movement = 'up' then move else 0 end) as vertical
from pil... |
<reponame>rips/zend-server
INSERT INTO RIPS_SETTINGS
(id, ui_url, api_url, email, password)
VALUES
(1, 'https://saas.ripstech.com', 'https://api-3.ripstech.com', '', '');
|
<filename>db/migrations/98_add_hostname_git_server_name.up.sql
alter table git_server add hostname text; |
<reponame>moyrne/tebot
create table q_user
(
id bigint auto_increment,
quid bigint not null,
nickname varchar(128) null,
sex varchar(16) null,
age int null,
bind_area varchar(128) null,
mode int null,
ban bool default false not null,
constraint q_user_pk
primary key (id)
);
... |
<gh_stars>1-10
----------------------------------- Mapping number 1 ----------------------------------------------
20 initial source relations =agency_cp_4_nl0_ce0..brown_adl_2_nl0_ce0..charge_ad_3_nl0_ce0..chin_cp_2_nl0_ce0..copy_dl_4_nl0_ce0..division_ad_2_nl0_ce0..found_adl_3_nl0_ce0..gold_ad_4_nl0_ce0..great_ad_1_... |
<reponame>ned21/aquilon
CREATE TABLE reboot_intervention (
id INTEGER CONSTRAINT reboot_intervention_id_nn NOT NULL,
CONSTRAINT reboot_intervention_pk PRIMARY KEY (id),
CONSTRAINT ri_resource_fk FOREIGN KEY(id) REFERENCES intervention (id) ON DELETE CASCADE
);
QUIT;
|
CREATE INDEX IF NOT EXISTS vis_lbl_visibility_id ON visibility_labels (visibility_id); |
CREATE TABLE rs_temp_reading (reading_time TIMESTAMP, reading_value NUMERIC); |
<reponame>mmci2468/automate<filename>components/automate-workflow-server/schema/verify/changes.sql
-- Verify changes
BEGIN;
SELECT id, pipeline_id, feature_branch, merge_sha
FROM changes
WHERE FALSE;
ROLLBACK;
|
<reponame>tburdett/goci
/*
################################################################################
Migration script to set SNP_CHECKED value in Association table
Designed for execution with Flyway database migrations tool; this should be
automatically run to completely generate the schema that is out-of-the-... |
DROP PROCEDURE If EXISTS getEmployeeById;
CREATE PROCEDURE getEmployeeById(IN employeeNo INTEGER) SELECT employeeNumber,lastName,firstName,email FROM Employees where employeeNumber = employeeNo;
DROP PROCEDURE If EXISTS countEmployees;
CREATE PROCEDURE countEmployees(OUT employees INTEGER) SELECT count(*) INTO employ... |
CREATE INDEX `identity_credential_identifiers_nid_idx` ON `identity_credential_identifiers` (`id`, `nid`); |
((fcinfo)->context != NULL && IsA((fcinfo)->context, EventTriggerData))
|
<reponame>anthonyf996/couch-potatoes-sql-backend
INSERT INTO Interest_Subcategory VALUES ( 'Academia', 'Accounting' );
INSERT INTO Interest_Subcategory VALUES ( 'Academia', 'Afrikaans' );
INSERT INTO Interest_Subcategory VALUES ( 'Academia', 'Ancient History' );
INSERT INTO Interest_Subcategory VALUES ( 'Academia', 'An... |
CREATE DATABASE futbolshop;
USE futbolshop;
CREATE TABLE categories(
CategoriesID INT AUTO_INCREMENT,
CategoriesName VARCHAR(50) NOT NULL,
PRIMARY KEY (CategoriesID)
);
CREATE TABLE suppliers(
SuppliersID INT AUTO_INCREMENT,
SuppliersName VARCHAR(100) NOT NULL,
PRIMARY KEY (Suppl... |
<reponame>todorkrastev/softuni-software-engineering
USE `diablo`;
SELECT
`user_name`,
SUBSTRING(`email`,
LOCATE('@', `email`) + 1) AS `email_provider`
FROM
`users`
ORDER BY `email_provider` , `user_name`; |
create or alter procedure Role.[test that when inserting existing role then should throw error]
as
begin
declare @RoleName nvarchar(10) = 'Role_X';
declare @ErrorMessage nvarchar(max) = N'Cannot insert duplicate key row in object ''auth.Role'' with unique index ''UX_Role_Name''. The duplicate key value is (' + @Role... |
CREATE TABLE [dbo].[Tag]
(
[Name] NVARCHAR(30) NOT NULL PRIMARY KEY
)
|
--7. Quel est le nombre de filieres representees pour le salon de l'etudiant de Lille ?
select count (distinct (t.Filiere))
from table (select ev.Intervenants
from Evenement ev
where lieu = 'Lieu 2'
) t; |
-- ------------------------------------------------------------------
-- -- This query is demonstrating OR FILTER
SELECT Population,Continent,IndepYear
FROM World.Country
WHERE IndepYear = 1971 OR Continent = 'Asia';
-- ------------------------------------------------------------------- |
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.5 (Ubuntu 13.5-0ubuntu0.21.10.1)
-- Dumped by pg_dump version 13.5 (Ubuntu 13.5-0ubuntu0.21.10.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_str... |
<reponame>metas-fresh/fresh
/*
* #%L
* metasfresh-material-dispo-service
* %%
* Copyright (C) 2022 metas GmbH
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the... |
<gh_stars>10-100
DO
$do$
BEGIN
CREATE ROLE crud;
EXCEPTION WHEN DUPLICATE_OBJECT THEN
RAISE NOTICE 'not creating role crud -- it already exists';
END
$do$;
-- Modify existing tables and sequences.
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO crud;
REVOKE ALL PRIVILEGES ON TABLE flyway_s... |
--CREATE TABLE IF NOT EXISTS query_reference (
-- id INTEGER PRIMARY KEY AUTOINCREMENT,
-- name VARCHAR(255) NOT NULL,
-- type VARCHAR(100) NOT NULL,
-- required_access VARCHAR(100) NOT NULL,
-- created_by VARCHAR(100) NOT NULL,
-- description VARCHAR(255) DEFAULT NULL,
-- status VARCHAR(100) DEFAULT NULL,
-- q... |
-- MySQL dump 10.13 Distrib 5.7.32, for Linux (x86_64)
--
-- Host: localhost Database: myblog
-- ------------------------------------------------------
-- Server version 5.7.32
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... |
<reponame>joshuakaluba/HttpAssetStatusLogger<gh_stars>0
CREATE TABLE `monitoredsite` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`url` varchar(255) NOT NULL,
`active` TINYINT(1) NOT NULL DEFAULT 1,
`dateCreated` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=lati... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 28, 2019 at 08:28 AM
-- Server version: 10.1.40-MariaDB
-- PHP Version: 7.1.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
<filename>AlwaysOnFailover.sql
--connect to the server instance that hosts the target secondary replica.
ALTER AVAILABILITY GROUP [car] FAILOVER;
GO
|
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 100419
Source Host : localhost:3306
Source Schema : db_khoir
Target Server Type : MySQL
Target Server Version : 100419
File Encoding : 65001
Date: 11/08/2021... |
<reponame>naturalis/trait-geo-diverse
create table if not exists taxa (
taxon_id integer constraint taxon_pk primary key asc autoincrement,
taxon_name text, -- index
taxon_level text,
msw_id integer,
gbif_taxon_key integer
);
create table if not exists taxonvariants (
taxonvariant_id integer constraint taxonvari... |
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 22-06-2018 a las 18:57:35
-- Versión del servidor: 10.0.34-MariaDB-0ubuntu0.16.04.1
-- Versión de PHP: 7.0.30-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+0... |
<filename>src/030_support_functions_for_building_number.sql
--------------------------------
-- <NAME>, 2016
-- projet geohistorical data
--
--------------------------------
-- fonction reconnaissant et exploitant la numrotation de rue francaise
-- pour deux numros donns 48 bis, 48-A, 48A etc
-- on veut pouvoir les o... |
UPDATE item_extra_combinations
SET extra_value_id = 5
WHERE combination_id = 21;
|
begin;
DROP TABLE "article";
DROP TABLE "user";
CREATE TABLE "user" (
"id" BIGSERIAL,
"name" VARCHAR(50) NOT NULL,
"password" VARCHAR(50) NOT NULL,
"is_married" BOOLEAN DEFAULT NULL,
"age" INT DEFAULT NULL,
PRIMARY KEY ("id"),
UNIQUE ("name")
);
CREATE INDEX "INDEX_user_age" ON "user" ("a... |
-- file:inherit.sql ln:343 expect:true
ALTER TABLE inht1 RENAME b TO bb
|
CREATE TABLE people (
userid INTEGER PRIMARY KEY ASC,
username TEXT,
passwd <PASSWORD>,
dupecheck TEXT,
ssn TEXT,
ssn_blindindex TEXT,
realname TEXT
);
|
select *
from
(
( -- Count each "I did this" in the timeframe as one
select
(I.exterior ->> 'opportunity')::uuid as "opportunity!",
(I.exterior ->> 'latest')::timestamptz as "when!"
from c_involvement I
where
(I.interior ->> 'participant') = $1::text
and
(I.... |
<gh_stars>0
select JCUSER,TO_DATE(TO_CHAR(to_number(JCSBMDATE)+1900000), 'YYYYDDD'), JCSBMTIME,JCFNDFUF2,trim(regexp_substr(JCFNDFUF2, '[^_]+', 1, 1)) from SVM900.F986110_EPC_HISTORY
With d as
(
select EXTRACT (YEAR from D) as"YEAR" ,EXTRACT (MONTH from D) as "M" ,RPT from
(
select JCUSER,TO_DATE(TO_CHAR(to_numbe... |
<reponame>chengyi4225372/play
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50728
Source Host : localhost:3306
Source Database : play
Target Server Type : MYSQL
Target Server Version : 50728
File Encoding : 65001
Date: 2020-05-17 12:04:40
*/
SET FORE... |
<filename>Mysql/storage/ndb/nodejs/test/spi/drop.sql
use test;
drop table if exists tbl1;
drop table if exists tbl2;
drop table if exists tbl3;
drop table if exists tbl4;
|
/****** Object: StoredProcedure [dbo].[UpdateInstrumentUsageAllocationsXML] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE UpdateInstrumentUsageAllocationsXML
/****************************************************
**
** Desc:
** Update requested instrument usage allocation from inp... |
<filename>WNPRC_EHR/resources/queries/study/waterPivot.sql
/*SELECT
wp.id,
CAST (wp.date AS DATE) AS Date,
CAST(COALESCE ((SELECT SUM (CAST (iwg.volume AS NUMERIC)) FROM study.waterGiven iwg WHERE iwg.id=wp.id AND (dayofyear(iwg.date)-dayofyear(wp.date)) =0 AND iwg.assignedto LIKE 'laboratory'),0) AS NUMERIC) AS volum... |
-- tpch10 using 1395599672 as a seed to the RNG
select
c.c_custkey,
c.c_name,
sum(l.l_extendedprice * (1 - l.l_discount)) as revenue,
c.c_acctbal,
n.n_name,
c.c_address,
c.c_phone,
c.c_comment
from
cp."tpch/customer.parquet" c,
cp."tpch/orders.parquet" o,
cp."tpch/lineitem.parquet" l,... |
<filename>software/cabio-database/scripts/sql_loader/arrays/popFreq_pre.sql
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
TRUNCATE TABLE population_frequency REUSE STORAGE;
@$LOAD/indexer_new.sql population_frequency
... |
autocommit off;
(attr_name string default '10')
method fun(string) float;
alter class foo_c rename method fun as attr_name;
rollback work;
rollback;
|
SELECT COUNT(*)
FROM site AS s,
so_user AS u1,
tag AS t1,
tag_question AS tq1,
question AS q1,
badge AS b1,
account AS acc
WHERE s.site_id = u1.site_id
AND s.site_id = b1.site_id
AND s.site_id = t1.site_id
AND s.site_id = tq1.site_id
AND s.site_id = q1.site_id
AND t1.id = tq1.tag... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 09, 2020 at 10:27 AM
-- Server version: 5.7.29-0ubuntu0.18.04.1
-- PHP Version: 7.2.24-0ubuntu0.18.04.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
CREATE OR REPLACE FUNCTION get_session(cookie bigint) returns jsonb AS $$
var records
if (cookie == null) {
records = plv8.execute('insert into application.sessions default values returning *')
}
else {
records = plv8.execute('update application.sessions set last_touched = now() where id = $1 and last_t... |
delete p1 from Person p1, Person p2
where p1.Email=p2.Email
and p1.Id>p2.Id |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 13, 2019 at 02:03 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.2.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... |
<reponame>Skeftical/modelbasedaqp<filename>code/TPC-H/create_tpch_tables.sql
-- nation
CREATE TABLE IF NOT EXISTS "nation" (
"n_nationkey" INT,
"n_name" CHAR(25),
"n_regionkey" INT,
"n_comment" VARCHAR(152),
"n_dummy" VARCHAR(10),
PRIMARY KEY ("n_nationkey"));
-- region
CREATE TABLE IF NOT ... |
/*
Warnings:
- You are about to drop the `files` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `haste` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `settings` table. If the table is not empty, all the... |
/* The database objects need to be case-sensitive, to make the tests run as expected!
See https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/996#issuecomment-568563374 */
drop procedure if exists `Employee Sales by Country`;
/* GO */
drop procedure if exists `Sales by Year`;
/* GO */
drop p... |
<reponame>remi-sap/sample-property-graph
-- you might need to have a user grant permission
-- grant execute on _SYS_AFL.PAL_LINK_PREDICT to system
create or replace procedure POLER.LINK_PREDICTION()
DEFAULT SCHEMA POLER as
begin
--sample execution of PAL Link prediction algorithm.
--Parameter table needed for P... |
<reponame>goldmansachs/obevo-kata
CREATE PROCEDURE SP323(OUT MYCOUNT INTEGER) SPECIFIC SP323_43020 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE250;SELECT COUNT(*)INTO MYCOUNT FROM TABLE146;SELECT COUNT(*)INTO MYCOUNT FROM TABLE15... |
SELECT
position_id,
employee_id,
LAST_VALUE(employee_id)
OVER(PARTITION BY position_id
ORDER by employee_id
RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS "last_value"
FROM
dfs."%s/window/b4.p4"
|
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- SYNC2 TABLE sync2_drop_column_ao_default1
--
CREATE TABLE sync2_drop_column_ao_default1 ( a int,col001 char DEFAULT 'z',col002 numeric,col003 boolean DEFAULT false,col004 bit(3) DEFAULT '111',col005 text DEFAULT 'pookie', col006 i... |
ALTER TABLE [UCSF.].[NameAdditions] ADD [PublishingLast] [nvarchar](50) NULL ; |
<filename>02. CRUD-Exercises/02. CRUD-Exercises.sql
--Part I – Queries for SoftUni Database
USE SoftUni
--2. Find All Information About Departments
--Write a SQL query to find all available information about the Departments.
--Example
--DepartmentID Name ManagerID
--1 Engineering 12
--2 Tool Design 4
--3 Sa... |
SELECT acc.location, count(*)
FROM
site as s,
so_user as u1,
question as q1,
answer as a1,
tag as t1,
tag_question as tq1,
badge as b,
account as acc
WHERE
s.site_id = q1.site_id
AND s.site_id = u1.site_id
AND s.site_id = a1.site_id
AND s.site_id = t1.site_id
AND s.site_id = tq1.site_id
AND s.site_id = b.site_id
AND q1... |
prompt --application/shared_components/security/authorizations/is_resource
begin
-- Manifest
-- SECURITY SCHEME: IS_RESOURCE
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2020.10.01'
,p_release=>'20.2.0.00.20'
,p_default_workspace_id=>116577013837797376
,p_default_application_id=>1000
,... |
<reponame>2011-nov02-net/alex-code
DROP TABLE IF EXISTS Store
CREATE TABLE Store (
Id INT PRIMARY KEY IDENTITY,
Name NVARCHAR(99) NOT NULL,
)
DROP TABLE IF EXISTS Customer
CREATE TABLE Customer (
Id INT PRIMARY KEY IDENTITY,
FirstName NVARCHAR(99) NOT NULL,
LastName NVARCHAR(99) NOT NULL,
Phone NVARCHAR(99)
)
D... |
<filename>SQL/Connections/WhoHasAccessedServer.sql
SELECT
I.NTUserName,
I.loginname,
I.SessionLoginName,
I.databasename,
Min(I.StartTime) as first_used,
Max(I.StartTime) as last_used,
S.principal_id,
S.sid,
S.type_desc,
S.name
FROM
sys.traces T CROSS Apply
::fn_trace_gettable(CASE
... |
<reponame>projectlearningdotid/templatefornewproject
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 09, 2021 at 01:29 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zo... |
select relname,round(100*cast(idx_blks_hit as numeric) /(idx_blks_hit + idx_blks_read ),4)
as hit_pct,idx_blks_hit,idx_blks_read from pg_statio_user_tables
where (idx_blks_hit +idx_blks_read) >0 order by hit_pct;
|
<reponame>Katsarov/DB
CREATE PROC usp_GetHoldersFullName
AS
SELECT FirstName + ' ' + LastName AS [Full Name]
FROM AccountHolders
GO
EXEC usp_GetHoldersFullName |
<reponame>nzewiski/cs3380-groupproject-public
/*
Navicat MySQL Data Transfer
Source Server : kevinroth.com
Source Server Type : MySQL
Source Server Version : 50537
Source Host : localhost
Source Database : kroth_main
Target Server Type : MySQL
Target Server Version : 50537
File ... |
INSERT INTO employee (first_name, last_name, role_id, manager_id)
VALUES ("Akira", "Rukawakaede", 1, null);
INSERT INTO employee (first_name, last_name, role_id, manager_id)
VALUES ("Akagi", "Takenori", 2, "1");
INSERT INTO employee (first_name, last_name, role_id, manager_id)
VALUES ("Miyagi", "Ryota", 3, "1");
INS... |
SELECT
SATC.TABLE_NAME as "table_name",
SATC.COLUMN_NAME as "column_name",
SATC.DATA_TYPE as "data_type",
CASE WHEN SATC.NULLABLE = 'Y' THEN 1 ELSE 0 END "nullable",
NVL(SATC.DATA_PRECISION, SATC.DATA_LENGTH) as "precision",
SATC.DATA_SCALE as "scale"
FROM SYS.ALL_TAB_COLUMNS SATC
JOIN SYS.ALL_TABLES SAT ON SAT.OWNER =... |
CREATE PROCEDURE [dbo].[buscaCliNome]
@nome varchar(50)
AS
SELECT cpf, nome, endereco, telefone
from clientes
where nome like @nome + '%'
RETURN 0
|
/*
Script para criação do banco de dados do Sistema Komada Eletronica
Versão 0.1
Comando para exclusão caso necessario.
drop database komandaeletronica;
*/
/* Criação da base de dados
######################################## */
create database IF NOT EXISTS komandaeletronica;
/* Selecionando a database para criar ... |
# ************************************************************
# Sequel Pro SQL dump
# Version 4096
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 192.168.1.156 (MySQL 5.5.37-0ubuntu0.14.04.1)
# Database: rest
# Generation Time: 2014-11-13 16:16:34 +0000
# *******************************... |
<reponame>downtowndailybread/ClientMonitor
alter table bethsaida.event
add column date timestamp not null;
|
<gh_stars>1-10
-- ________________________________________________________________
create table products_2015_0106(
CONSTRAINT __products20150106_check
CHECK(entered >= '2015-01-01 00:00+00'::timestamptz
and entered < '2015-07-01 00:00+00'))
INHERITS (products);
CREATE INDEX products_2015_0106_pil_id... |
DROP VIEW IF EXISTS bygning_kommune_view CASCADE;
CREATE VIEW bygning_kommune_view AS (
SELECT DISTINCT
bygninger.id AS bygningid,
kommuner.kode AS kommunekode
FROM bygninger JOIN kommuner_divided kommuner ON ST_Intersects(bygninger.geom, kommuner.geom)); |
SELECT
'{{"red"}}' as color
|
WITH ticketing_origin_destination AS (
SELECT
vw_ticketing.as_at,
card_id,
daily_trip_id,
daily_trip_stage,
origin_time,
EXTRACT(HOUR FROM origin_time) AS origin_hour,
origin_mode,
origin_code,
tile_id AS origin_tile_id,
destination_mode,
destination_code,
CASE
WHEN daily_trip_stage = 'Las... |
<filename>data/create_table.sql
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
id BIGINT NOT NULL
, gender INTEGER
, birthday DATE
, state_code CHAR(8)
, last_login DATE
, create_date TIMESTAMP
);
DROP TABLE IF EXISTS receipt;
CREATE TABLE receipt (
id BIGINT NOT NULL... |
<reponame>jdkoren/sqlite-parser<gh_stars>100-1000
-- tkt-8454a207b9.test
--
-- db eval {
-- ALTER TABLE t1 ADD COLUMN e DEFAULT -123.0;
-- SELECT e, typeof(e) FROM t1;
-- }
ALTER TABLE t1 ADD COLUMN e DEFAULT -123.0;
SELECT e, typeof(e) FROM t1; |
{% macro faker(
model,
create = 100
) %}
{% for name,
factory in model.items() %}
{% if loop.first %}
WITH
{% else %},
{% endif %}
WITH {{ name }} AS (
{{ factory }}
)
{% endfor %}
SELECT
{% for name,
factor... |
update vacuna
set nombre = :nombre,
estado = :estado,
fecha_aplicacion = :fechaAplicacion,
subsidiada = :subsidiada,
valor = :valor,
dosis = :dosis,
id_usuario = :idUsuario,
dosis_pendiente = :dosisPendiente,
tiempo_entre_dosis = :tiempoEntreDosis
where id = :id |
ALTER TABLE scene
DROP CONSTRAINT scene_product_id_timestamp_key;
|
<gh_stars>1-10
-- Verify ggircs-portal:policies/organisation_policies on pg
begin;
-- ciip_administrator Policies
select ggircs_portal_private.verify_policy('select', 'ciip_administrator_select_organisation', 'organisation', 'ciip_administrator');
select ggircs_portal_private.verify_policy('insert', 'ciip_administrat... |
<filename>sctp-core/src/main/resources/db/migration/V1.50.1653466873856__Revise_targeting_sessions_view.sql
-- indicate whether a targeting session has been reviewed on the mobile app
DROP VIEW IF EXISTS target_sessions_view;
CREATE VIEW target_sessions_view
AS
SELECT ts.*
, p.name program_name
, d.name district_na... |
<filename>openGaussBase/testcase/KEYWORDS/like/Opengauss_Function_Keyword_Like_Case0021.sql
-- @testpoint: opengauss关键字like(保留),作为函数名 合理报错
--关键字不带引号-成功
create function like(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
--清理环境
drop function like(i integer);
--关键字带双引号-成功
create fun... |
<gh_stars>1-10
-- ----------------------------
-- Table structure for sys_data_dict
-- ----------------------------
DROP TABLE IF EXISTS "sys_data_dict";
CREATE TABLE "sys_data_dict"
(
"id" int8 NOT NULL,
"tenant_id" int8,
"revision" int8 NOT NULL DEFAULT 1,
"de... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 11, 2021 at 02:15 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<filename>public/client/categories.sql
/*
Navicat MySQL Data Transfer
Source Server : zltgov
Source Server Version : 50717
Source Host : localhost:3306
Source Database : zltgov
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-01-23 15:54:30
... |
select
ecb.id as event_id,
comp.name as competition,
comp.datetime_start as start,
ec.name as event_category,
f.name as federation,
d.name as division,
p.name as proficiency,
s.name as style,
da.name as dance
from
das.event_competitive_ballroom ecb
join das.event e on ecb.event_id = e.id
join das.co... |
DROP TABLE IF EXISTS feed_items
|
<reponame>MusculoCreativo/flips<filename>public/sql/ddl.sql
-- creacion de la vista de puntajes
DROP VIEW IF EXISTS VW_puntajes_totales;
CREATE VIEW VW_puntajes_totales AS (
SELECT
U.doc AS documento,
CONCAT(U.nombre, ' ', U.apellido) AS usuarios,
SUM(C.gramos) AS puntos
FROM
`c... |
<reponame>mohamedsabrialijla/tasks<filename>tasks.sql
-- MySQL dump 10.16 Distrib 10.1.21-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: localhost
-- ------------------------------------------------------
-- Server version 10.1.21-MariaDB-1~xenial
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<filename>banco-relacional/inserirPrefeitos.sql
select * from cidades;
insert into prefeitos
(nome, cidade_id )
values
('<NAME>', 5),
('<NAME>', 6),
('<NAME>', null);
select * from prefeitos;
insert into prefeitos
(nome, cidade_id )
values
('<NAME>', null); |
<gh_stars>0
INSERT INTO players (name, initialrating, currentrating) VALUES
('A', 1000, 1000),
('B', 1200, 1200),
('C', 1300, 1300),
('D', 1350, 1350),
('E', 1400, 1400),
('F', 1425, 1425);
INSERT INTO rounds ("date") VALUES ('2019-01-28'), ('2019-02-04'), ('2019-02-11');
INSERT INTO games (played, white, black... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.