sql stringlengths 6 1.05M |
|---|
<reponame>liangzi4000/grab-share-info
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603686',@CutoffDate = N'2017-09-30',@EPS = N'0.72',@EPSDeduct = N'0',@Revenue = N'22.68亿',@RevenueYoy = N'44.54',@RevenueQoq = N'0.70',@Profit = N'1.91亿',@ProfitYoy = N'26.03',@ProfiltQoq = N'2.14',@NAVPerUnit = N'4.9610',@ROE = N'14.98',@CashPe... |
<filename>projects/populate-nested-data-from-json-in-postgresql/src/schema.sql
CREATE TABLE "public"."accounts" (
"id" SERIAL,
"nickname" VARCHAR(50),
"created_at" TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
PRIMARY KEY ("id"),
CONSTRAINT "un_nickname" UNIQUE ("nickname")
);
CREATE TABLE "public"."profiles" (
... |
<filename>SRV/SRV/SRV/inf/Stored Procedures/RunAsyncExecute.sql
CREATE PROCEDURE [inf].[RunAsyncExecute]
(
@sql nvarchar(max),
@jobname nvarchar(57) = null,
@database nvarchar(128)= null,
@owner nvarchar(128) = null
)
AS BEGIN
/*
асинхронный вызов пакета через задания Агента
RunAsyncExecute - asynchronous exe... |
<filename>db/tubes2.sql<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 18, 2021 at 03:18 PM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
/* Formatted on 12-19-2018 2:12:35 PM (QP5 v5.126.903.23003) */
CREATE OR REPLACE FUNCTION SCM.GET_CSTMR_SPLR_NAME (P_CSTMRSPLRID NUMBER)
RETURN VARCHAR2
AS
L_RESULT VARCHAR2 (200 BYTE);
BEGIN
SELECT CUST_SUP_NAME
INTO L_RESULT
FROM SCM.SCM_CSTMR_SUPLR
WHERE CUST_SUP_ID = P_CSTMRSPLRID;... |
<reponame>bhikkhu-kosalla-china/mint
-- Your SQL goes here
--不同版本页码
CREATE TABLE multi_edition_page_numbers (
id SERIAL PRIMARY KEY,
edition VARCHAR (8) NOT NULL,
book_id INTEGER NOT NULL,
paragraph INTEGER NOT NULL,
vol INTEGER NOT NULL,
page INTEGER NOT NULL,
... |
<reponame>somersbmatthews/postgresqlninja<filename>123/ninja8ho1.sql
-- SELECT * FROM people LIMIT 10;
-- SELECT pfirstname, pfavorites FROM people LIMIT 10;
SELECT pfirstname, pfavorites -> 'Desserts' FROM people LIMIT 10;
-- fancy
-- SELECT pfirstname, pfavorites -> 'Desserts' AS "FavDesserts" FROM people LIMIT 10;
... |
<reponame>microsoft/FHIR-Analytics-Pipelines
CREATE EXTERNAL TABLE [fhir].[RiskAssessment] (
[resourceType] NVARCHAR(4000),
[id] VARCHAR(64),
[meta.id] NVARCHAR(4000),
[meta.extension] NVARCHAR(MAX),
[meta.versionId] VARCHAR(64),
[meta.lastUpdated] VARCHAR(30),
[meta.source] VARCHAR(256),
... |
{{ config(schema="test_normalization", tags=["top-level-intermediate"]) }}
-- SQL model to prepare for deduplicating records based on the hash record column
select
row_number() over (
partition by {{ quote('_AIRBYTE_POS_DEDUP_CDCX_HASHID') }}
order by {{ quote('_AIRBYTE_EMITTED_AT') }} asc
) as {{ quote('_A... |
<reponame>Gigelf-evo-X/evo-X<gh_stars>1-10
UPDATE `creature_template` SET `ScriptName` = 'npc_screecher_spirit' WHERE `entry` = 8612;
UPDATE `item_template` SET `ScriptName` = 'item_yehkinyas_bramble' WHERE `entry`= 10699;
|
SET EVENT MONITOR DB2ACTIVITIES STATE 0#
DROP EVENT MONITOR DB2ACTIVITIES#
DROP PROCEDURE DROP_WLM#
DROP TYPE TABLE_ARRAY#
DROP TABLE SHOWRESULTS#
CREATE TYPE TABLE_ARRAY AS VARCHAR(128) ARRAY[]#
CREATE TABLE SHOWRESULTS(DROPPED_TABLES VARCHAR(128))#
CREATE PROCEDURE DROP_WLM
LANGUAGE SQL
BEGIN
DECLARE TA... |
<reponame>xmrsoftware/nanoscopic
/*
Copyright 2021 XMR VPS Ltd
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 a... |
#standardSQL
# Difference between Cache TTL and the contents age
CREATE TEMPORARY FUNCTION toTimestamp(date_string STRING)
RETURNS INT64 LANGUAGE js AS '''
try {
var timestamp = Math.round(new Date(date_string).getTime() / 1000);
return isNaN(timestamp) || timestamp < 0 ? -1 : timestamp;
} catch (e) {
r... |
insert into license (name, description, url) values ('cc-by-nc-4.0', 'Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)', 'https://creativecommons.org/licenses/by-nc/4.0/');
insert into license (name, description, url) values ('cc-by-3.0', 'Attribution 3.0 Unported (CC BY 3.0)', 'https://creativecommons.org/li... |
<reponame>transferwise/tw-tkms<filename>demoapp/src/main/resources/db/migration/mysql/V3__earliest_visible_message.sql
CREATE TABLE tw_tkms_earliest_visible_messages
(
shard BIGINT NOT NULL,
part BIGINT NOT NULL,
message_id BIGINT NOT NULL,
PRIMARY KEY (shard, part)
) |
<reponame>goldmansachs/obevo-kata
CREATE FUNCTION func652() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE29);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE151);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE475... |
-- tokens no longer have to have projects
ALTER TABLE chef_authn_tokens DROP CONSTRAINT IF EXISTS chef_authn_tokens_project_ids_check;
|
<reponame>thomasjfox/horde<filename>framework/Rdo/test/Horde/Rdo/fixtures/unit_tests.sql<gh_stars>1-10
--
-- Copyright 2012-2016 Horde LLC (http://www.horde.org/)
--
-- @author <NAME> <<EMAIL>>
-- @category Horde
-- @package Rdo
-- @subpackage UnitTests
--
INSERT INTO test_somelazybaseobjects (baseobject_id, r... |
<reponame>milindsalwe/ispconfig<filename>install/sql/incremental/upd_0055.sql
ALTER TABLE `sys_datalog` ADD `error` MEDIUMTEXT NULL DEFAULT NULL;
|
-- Assumption: Since we didn't care about byte precision before, we can do this:
UPDATE files SET size=size*1024;
|
SELECT
rrq.id AS id,
cmp.name AS company_name,
srq.name AS request_name,
rrq.status AS request_status,
CASE
WHEN rrq.status = 'CTO_NEED' THEN CONCAT(prv.first_name, ' ', prv.last_name)
ELSE ''
END AS full_name,
rrq.priority AS priority,
rrq.status_changed_date AS request_status_changed_date,
... |
CREATE PROCEDURE [dbo].[usp_User_Read_ByUserId]
@UserId uniqueidentifier
AS
Begin
SELECT * FROM Users
WHERE UserId = @UserId
END
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 11, 2018 at 06:49 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40... |
<reponame>jackobo/jackobs-code
ALTER TABLE dbo.GameVersion_Language_ToArtifactorySyncQueue
DROP CONSTRAINT DF_GameVersion_LanguageHashQueue_InsertedTime
GO
CREATE TABLE dbo.Tmp_GameVersion_Language_ToArtifactorySyncQueue
(
Row_ID int NOT NULL IDENTITY (1, 1),
GameVersion_ID uniqueidentifier NOT NULL,
InsertedTime... |
<filename>YoctoScheduler.Core/Database/tsql/Server/New.sql<gh_stars>1-10
INSERT INTO [live].[Servers]
([Status]
,[Description]
,[LastPing]
,[HostName]
,[IPs])
OUTPUT [INSERTED].[ServerID], [INSERTED].[LastPing]
VALUES(
@status,
@description,
GETDATE(),
@HostName,
@IPs
) |
<reponame>navikt/spsak<filename>mottak/migreringer/src/main/resources/db/migration/defaultDS/1.0/V1.1_07__Konfig_verdi_DDL.sql
CREATE TABLE KONFIG_VERDI
(
ID bigint,
KONFIG_KODE VARCHAR(50),
KONFIG_GRUPPE VARCHAR(50),
KONFIG_VERDI VARCHAR(255),
GYLDIG_FOM DA... |
-- Your SQL goes here
CREATE TABLE streamers_average_game_distribution (
streamer_id BIGINT NOT NULL REFERENCES streamers (id),
game_id BIGINT NOT NULL REFERENCES games (id),
hours FLOAT NOT NULL DEFAULT 0,
PRIMARY KEY (streamer_id, game_id)
);
CREATE INDEX streamers_average_game_distribution_streamer_id_idx O... |
<reponame>Nasfame/Assignments-Masai
use test;
select * from cars_data;
select distinct(car_make) from cars_data;
select distinct(car_color) from cars_data;
SELECT AVG(2020 - purchase_year) AS car_age FROM cars_data WHERE car_make = 'Honda';
|
INSERT INTO tweb_apbd(`rangkuman`,`berkas_id`,`lembaga_id`, `lembaga_kode`,`pemda_kode`, `wilayah_kode`,`tahun`, `rekening_kode`,`rekening`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `updated_by`) VALUES
('0','19','7','2.01.01.','2.01',... |
--
-- Copyright 2010-2013 <NAME> and the many contributors.
--
-- 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 ... |
<reponame>buptliuhs/ARE<gh_stars>1-10
INSERT INTO `are`.`sys_setting` (`user_id`, `name`, `description`, `value`) VALUES ('1', 'offset', 'Offset of range of angle (degree)', '5');
|
<reponame>ellerbus/Dynamo
if object_id('dbo.MemberInsertMany', 'P') is not null drop procedure dbo.MemberInsertMany
go
create procedure dbo.MemberInsertMany
@items dbo.MemberTableType readonly
as
insert into dbo.Member
(
memberName,
createdAt,
updatedAt
)
select x.memberName,
x.... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 02, 2020 at 04:26 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
select cal_dt, sum(price) as sum_price
from test_kylin_fact fact
inner join (
select count(1) as cnt, min(cal_dt) as "mmm", cal_dt as dt from test_kylin_fact group by cal_dt order by 2 desc limit 10
) t0 on (fact.cal_dt = t0.dt)
group by cal_dt |
<gh_stars>1-10
BEGIN;
ALTER TABLE "student"
RENAME COLUMN "zermelo_code" TO "zermelo_user";
COMMIT;
|
<reponame>lwinch2006/basic-asp.net-core-app<gh_stars>1-10
IF NOT EXISTS(SELECT * FROM [Information_Schema].[Tables] WHERE Table_Name='Users')
BEGIN
CREATE TABLE [Users] (
[Id] INT IDENTITY(1,1) NOT NULL CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED,
[UserName] NVARCHAR(100) NOT NULL,
[Normali... |
CREATE FUNCTION func830() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE464);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE171);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE132);val:=(SELECT COUNT(*)INTO MYCOU... |
<reponame>wuchunfu/XueYi-Cloud<filename>sql/xueyi_1.sql<gh_stars>1-10
-- ----------------------------
-- 1、租户信息表
-- ----------------------------
drop table if exists xy_tenant;
create table xy_tenant (
tenant_id bigint not null comment '租户Id',
strategy_id ... |
<reponame>fossabot/automate-1
-- Add previous_health column with the default HealthStatus 'NONE' that matches
-- with the protobuf definition => api/external/applications/applications.proto
ALTER TABLE service ADD COLUMN previous_health TEXT NOT NULL DEFAULT 'NONE';
-- (fix) drop the default value for the package_iden... |
CREATE OR REPLACE procedure HOMOLOGOUS_ASSOCIATION31a_LD as
CURSOR HOMOLASSOCCUR IS
(SELECT ROWNUM, hs_id, mm_id, sim
from (select g.gene_id hs_id,
g2.gene_id mm_id,
MAX(similarity) sim
FROM GENE_TV g,
GENE_TV g2,
c<EMAIL>H.GOV gh
... |
<filename>dbs/Flight Reservation.sql
-- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64)
--
-- Host: localhost Database: reservation
-- ------------------------------------------------------
-- Server version 8.0.18
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SE... |
<filename>one2manycustomeauth.sql
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 03, 2021 at 09:18 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_z... |
<reponame>jhingx1/Struts2ExamplesCibertec
-- En una base de datos de MySQL ejecutar este script:
DROP TABLE IF EXISTS productos;
-- tabla productos
CREATE TABLE productos (
codigoproducto int(11) NOT NULL AUTO_INCREMENT,
nombre varchar(200) NOT NULL,
precio double(10,2) NOT NULL,
PRIMARY... |
<filename>.docker/mysql/setup.sql
/* Create root user so we can connect to this remotely */
CREATE USER 'root'@'%';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
|
<gh_stars>0
create type spr.auth_t as (
is_admin boolean
);
-- override this as needed
--
create function spr.auth(
req jsonb
)
returns jsonb
language plpgsql
as $$
declare
a spr.auth_t;
begin
-- override the following as needed
a.is_admin = true;
return req || jsonb_bu... |
-- set
-- index starts at 1, substring 1,1 initial
-- sub queries
-- common table expression , have to be called again in query
-- IS NOT NULL, IS NULL
-- execution plan in Microsoft database
-- 1. which artists did not make any albums at all?
-- set opeation
select * from album;
select * from artist;
select arti... |
CREATE TABLE IF NOT EXISTS patient (
id int NOT NULL PRIMARY KEY,
patient_name varchar(256),
owner_name varchar(256),
patient_age varchar(256),
species varchar (256),
user_name varchar (256),
password varchar (256)
);
CREATE TABLE IF NOT EXISTS doctor (
id int NOT NULL PRIMARY KEY,
doctor_name var... |
<gh_stars>0
ALTER TABLE drivers
RENAME TO users;
ALTER TABLE race_entrants
CHANGE COLUMN driver_id user_id INTEGER NOT NULL;
|
<filename>clients/mysql-schema/generated/Model/ComputerSet.sql<gh_stars>0
--
-- <NAME>.
-- Prepared SQL queries for 'ComputerSet' definition.
--
--
-- SELECT template for table `ComputerSet`
--
SELECT `_class`, `busyExecutors`, `computer`, `displayName`, `totalExecutors` FROM `ComputerSet` WHERE 1;
--
-- INSERT temp... |
<filename>ColumnstoreIndexExample.sql
-- Note uses SQL 2016 features
USE tempdb;
GO
DROP TABLE IF EXISTS dbo.TestColumnStore;
CREATE TABLE dbo.TestColumnStore
(
ProductKey int NOT NULL,
OrderDateKey int NOT NULL,
DueDateKey int NOT NULL,
ShipDateKey int NOT NULL
)
GO
INSERT dbo.TestColumnStore
VALUES (1, 2, ... |
<gh_stars>10-100
CREATE TABLE foo (
id text,
other_id text,
about text,
other text
);
CREATE TABLE bar (
id text,
other_id text,
about text,
other text
);
|
<reponame>orbs-network/token-bi
USE `orbs_token`;
CREATE OR REPLACE VIEW `delegators_rewards` AS
-- returns the delegates rewards as a specific block number - which should be an elections block number
-- this is just the delegates part on a **specific** block, not the accumulated reward
SELECT
source AS address,... |
<reponame>Adarsh-sophos/MNIT
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 09, 2017 at 10:07 PM
-- Server version: 5.5.55-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!4... |
<reponame>jdkoren/sqlite-parser
-- randexpr1.test
--
-- db eval {SELECT ( -19-f+coalesce((select max( -~case when case 11 when ~coalesce((select max(13) from t1 where not (e)<>(t1.c)),19)+11 & -19-f then -13 else t1.c end-e<=t1.a then 11 when not exists(select 1 from t1 where (not t1.c<19) and not (13<>17)) then -e... |
<gh_stars>100-1000
CREATE TABLE list (id VARCHAR(10) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id));
INSERT INTO "list" ("id", "value") VALUES (E'AFA', E'Afghan Afghani (1927–2002)');
INSERT INTO "list" ("id", "value") VALUES (E'AFN', E'Afghani Afghanistan');
INSERT INTO "list" ("id", "value") VALUES (E'ALK', ... |
<reponame>Mickoon/GoogleFinance<filename>Create_GoogleFinance_Data.sql
USE [FinanceCrawler]
GO
/****** Object: Table [dbo].[GoogleFinance_Data] Script Date: 11/12/2014 9:46:58 p.m. ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GoogleFinance_Data](
[Identity] [bigint] IDENTITY(1,1)... |
<gh_stars>100-1000
/**************************************************************************
* Copyright 2016 Observational Health Data Sciences and Informatics (OHDSI)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obta... |
<filename>src/main/resources/ddl/amor.sql<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80022
Source Host : localhost:3306
Source Schema : amor
Target Server Type : MySQL
Target Server Version : 80022
F... |
<filename>languages/modules/zhuanlan/install/zhuanlan.sql
DROP TABLE IF EXISTS `shuyang_zhuanlan`;
/*------- CREATE SQL---------*/
CREATE TABLE `shuyang_zhuanlan` (
`id` int(10) NOT NULL auto_increment COMMENT 'ID',
`username` char(32) COMMENT '用户名',
`name` char(32) COMMENT '专栏名称',
`domain` char(60) COMMENT '自定... |
USE [JMS]
GO
DROP USER [jms]
GO
USE [master]
GO
CREATE LOGIN [jms] WITH PASSWORD=N'<PASSWORD>', DEFAULT_DATABASE=[JMS], CHECK_EXPIRATION=OFF, CHECK_POLICY=ON
GO
USE [JMS]
GO
CREATE USER [jms] FOR LOGIN [jms]
GO
EXEC sp_addrolemember N'db_owner', N'jms'
GO
|
<filename>sql/guns-v2.sql<gh_stars>1-10
/*
Navicat Premium Data Transfer
Source Server : mysql
Source Server Type : MySQL
Source Server Version : 50720
Source Host : localhost:3306
Source Schema : guns
Target Server Type : MySQL
Target Server Version : 50720
File Encoding ... |
--
-- Notifications.
--
CREATE TABLE notifications (
notification_id int NOT NULL auto_increment,
host_id int default NULL,
service_id int default NULL,
start_time int default NULL,
ack_author varchar(255) default NULL,
ack_data text default NULL,
command_name varchar(255) default NULL,
contact_name v... |
<gh_stars>1-10
SELECT intDiv(number, 100) AS k, length(groupArray(number)) FROM (SELECT * FROM system.numbers LIMIT 1000000) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10;
|
<filename>dms/t_usage_log.sql<gh_stars>1-10
--
-- Name: t_usage_log; Type: TABLE; Schema: public; Owner: d3l243
--
CREATE TABLE public.t_usage_log (
entry_id integer NOT NULL,
posted_by public.citext NOT NULL,
posting_time timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
message ... |
<filename>kata-files/lesson2/hsql/expected/MYLARGESCHEMA/table/TABLE48.sql
//// CHANGE name=change0
CREATE MEMORY TABLE TABLE48(ID INTEGER NOT NULL PRIMARY KEY,FIELD1 VARCHAR(30),USERTYPE1FIELD USERTYPE1,USERTYPE5FIELD USERTYPE5,USERTYPE9FIELD USERTYPE9)
GO
|
--
-- IMPORTANT: This file should be generated but with the work to move to pyrsl2 (9481)
-- the file is being committed rather than generated. The root of the problem we hit
-- is with pt_antlr and not pyrsl2. For grammar options, pt_antlr is creating Rule Reference
-- instances because the options do not start w... |
<reponame>220328-uta-sh-net-ext/Vladimir-Shnyakin
CREATE TABLE [dbo].[Restaurants] (
[RestaurantName] NVARCHAR (50) DEFAULT ('Unknown') NOT NULL,
[Cuisine] NVARCHAR (50) DEFAULT ('Unknown') NOT NULL,
[OverallRating] FLOAT (53) DEFAULT ((0)) NOT NULL,
CONSTRAINT [PK_Restaurants] PRIMARY KEY CL... |
<reponame>GrupoWeb/k8s_srv_mineco
USE `dm_edt_trade`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 172.16.17.32 Database: dm_edt_trade
-- ------------------------------------------------------
-- Server version 5.7.17-ndb-7.5.5-cluster-gpl
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... |
<filename>bpn (5).sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 22, 2020 at 03:56 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
-- CREATE TABLE users (
-- id UUID NOT NULL PRIMARY KEY UNIQUE,
-- name TEXT,
-- email TEXT NOT NULL UNIQUE,
-- phone TEXT,
-- hashedpw TEXT NOT NULL,
-- created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
-- updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
-- active BOOL NOT NULL DEF... |
create or replace procedure p_update_eco_projects(_p_id UUID, _status ECO_PROJECT_STATUS_ENUM)
language plpgsql
as
$$
begin
update eco_projects
set status = _status
where id = _p_id;
end
$$ |
<reponame>beatriz-sanchez-flores/PROYECTO_YELCARL
create procedure agregarCompras
@Id_compra int, @Id_proveedor int, @N_factura varchar(500), @Fecha date
as
begin
insert into Compras(Id_compra, Id_proveedor, N_factura, Fecha)
values (@Id_compra, @Id_proveedor, @N_factura, @Fecha)
end
create procedure editarCompras
... |
-- Quiz 1 Last Digit 3, 4, 5 SQL Solutions
-- Q3
Select SalesPersonID, year(OrderDate) as Year,
count(SalesOrderId) as 'Total Orders'
From Sales.SalesOrderHeader
where SalesPersonID in
(select SalesPersonID
From Sales.SalesOrderHeader
group by SalesPersonID
having count( distinct year(OrderDate... |
<reponame>fmidev/radon
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.4
-- Dumped by pg_dump version 13.3
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config... |
<gh_stars>0
/*
Navicat MySQL Data Transfer
Source Server : database
Source Server Version : 80017
Source Host : localhost:3306
Source Database : new
Target Server Type : MYSQL
Target Server Version : 80017
File Encoding : 65001
Date: 2022-03-19 21:43:06
*/
SET FOREI... |
SELECT PNO FROM P WHERE PNAME='Screw' OR P.PNO IN
( SELECT SP.PNO
FROM SP
WHERE SP.SNO = 'S1' );
SELECT SP.PNO
FROM SP
WHERE SP.SNO = 'S1'
OR SP.PNO IN
( SELECT P.PNO
FROM P
WHERE P.PNAME = 'Screw' ); |
DELETE FROM arbiter_data.role_permission_mapping
WHERE permission_id in (
SELECT id from arbiter_data.permissions
WHERE organization_id = get_organization_id('Organization 1')
AND object_type IN ('users', 'roles', 'permissions')
AND action != 'read'
);
|
ADD
ALL
ALTER
AND
ANY
AS
ASC
AUTHORIZATION
BACKUP
BEGIN
BETWEEN
BREAK
BROWSE
BULK
BY
CASCADE
CASE
CHECK
CHECKPOINT
CLOSE
CLUSTERED
COALESCE
COLLATE
COLUMN
COMMIT
COMPUTE
CONSTRAINT
CONTAINS
CONTAINSTABLE
CONTINUE
CONVERT
CREATE
CROSS
CURRENT
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
CURRENT_USER
CURSOR
DATABASE
DBCC... |
CREATE PROCEDURE usp_EmployeesBySalaryLevel(@Type NVARCHAR(10))
AS BEGIN
SELECT Result.FirstName AS [First Name], Result.LastName AS [Last Name]
FROM (
SELECT E.FirstName , E.LastName,
dbo.ufn_GetSalaryLevel(E.Salary) AS [Level]
FROM Employees AS E) AS Result
WHERE Result.Level = @Type
END
EXECUTE usp_Empl... |
use employees;
select distinct first_name from employees where first_name like 'E%';
SELECT
*
FROM
employees
WHERE
first_name IN (SELECT DISTINCT
first_name
FROM
employees
WHERE
first_name LIKE 'E%'); |
<filename>src/test/resources/sql/select/36cdd911.sql<gh_stars>10-100
-- file:interval.sql ln:181 expect:true
SELECT interval '1-2' year to month
|
/*========================================================== 1. 创建数据库 ===========================================================*/
USE [master]
GO
--删除数据库
EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'Sample'
GO
IF EXISTS (SELECT name FROM sys.databases WHERE name = N'Sample')
Begin
DROP DATABAS... |
<gh_stars>100-1000
CREATE TABLE [dbo].[ControlTableForSourceToSink](
[PartitionID] [int] IDENTITY(1,1) NOT NULL,
[ProjectName] [varchar](255) NOT NULL,
[SubjectArea] [varchar](255) NOT NULL,
[SourceSystem] [varchar](255) NOT NULL,
[SourceDatabaseServer] [varchar](255) NOT NULL,
[SourceDatabase] [varchar](255) NOT... |
DROP DATABASE IF EXISTS departments_db;
CREATE DATABASE departments_db;
USE departments_db;
CREATE TABLE departments (
id int not null primary key auto_increment,
name varchar(30)
);
CREATE TABLE roles (
id int not null primary key auto_increment,
title varchar(30),
salary decimal,
department... |
<gh_stars>0
-- CreateTable
CREATE TABLE `products` (
`id` VARCHAR(191) NOT NULL,
`name` VARCHAR(191) NOT NULL,
`bar_code` VARCHAR(191) NOT NULL,
`price` DECIMAL(65, 30) NOT NULL,
`create_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
UNIQUE INDEX `products_bar_code_key`(`bar_code`),
... |
SELECT
CONCAT(medecin.nom,' ',medecin.prenom)
AS nom_medecin,
GROUP_CONCAT(CONCAT(patient.nom,' ',patient.prenom) SEPARATOR';')
AS nom_patient
FROM patient
INNER JOIN consultation
ON id_PATIENT=PATIENT_id_PATIENT
INNER JOIN medecin
ON id_MEDECIN=MEDECIN_id_MEDECIN
GROUP BY id_medecin |
insert into `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data1... |
<filename>target/compiled/asana_source/models/src_asana.yml/schema_test/source_not_null_asana_task_created_at.sql
select count(*) as validation_errors
from `dbt-package-testing`.`asana`.`task`
where created_at is null
|
INSERT INTO proposal(name, document, salary, email, street, number, zip_code)
VALUES ('nome-teste', '42549789873', 1000, '<EMAIL>', 'Rua', '999', '01234567'); |
<filename>EdFi.Ods.Utilities.Migration/Scripts/MsSql/02Upgrade/v24_to_v25/11 Create Constraints/40420 AssessmentScore [PK, IX, D].sql
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2... |
<reponame>thilini89/wso2-ode
create table ODE_SCHEMA_VERSION(VERSION integer);
insert into ODE_SCHEMA_VERSION values (6);
-- Apache ODE - SimpleScheduler Database Schema
--
-- Apache Derby scripts by <NAME>.
--
--
DROP TABLE ode_job;
CREATE TABLE ode_job (
jobid VARCHAR(64) NOT NULL,
ts number(37) NOT NULL,
n... |
<gh_stars>0
DROP TABLE IF EXISTS hallgato;
DROP TABLE IF EXISTS tanulotars;
DROP TABLE IF EXISTS post;
DROP TABLE IF EXISTS csoport;
DROP TABLE IF EXISTS korrepetalas;
DROP TABLE IF EXISTS korrepetalas_resztvevo;
DROP TABLE IF EXISTS csoport_tag;
DROP TABLE IF EXISTS tantargy;
CREATE TABLE hallgato (
neptun varcha... |
<filename>src/main/resources/hive_ddl.sql
CREATE TABLE `area` (
`id` int ,
`city` varchar(10) ,
`city_full` varchar(50) ,
`province` varchar(10) ,
`province_full` varchar(50) ,
`longitude` float ,
`latitude` float
) row format delimited fields terminated by ',' stored as textfile;
CREATE TABLE `contract` ... |
DROP TABLE IF EXISTS Tokens;
|
<reponame>likeshop-github/likeadmin
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for ls_admin
-- ----------------------------
DROP TABLE IF EXISTS `ls_admin`;
CREATE TABLE `ls_admin` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`root` tinyint(1) UNSIGNED NO... |
<gh_stars>100-1000
SELECT *, percentile(usage) as pct FROM sample WHERE pct > 0.95 INTO OUTFILE '18.csv';
|
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may not... |
CREATE TABLE IF NOT EXISTS `kwc_events_to_categories` (
`id` int(11) NOT NULL auto_increment,
`event_id` int(11) NOT NULL default '0',
`category_id` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `event_id` (`event_id`,`category_id`),
KEY `event_id_2` (`event_id`),
KEY `category_id` (`categ... |
PG_FUNCTION_INFO_V1(make_array);
Datum
make_array(PG_FUNCTION_ARGS)
{
ArrayType *result;
Oid element_type = get_fn_expr_argtype(fcinfo->flinfo, 0);
Datum element;
bool isnull;
int16 typlen;
bool typbyval;
char typalign;
int ndims;
int... |
<gh_stars>0
INSERT INTO `#__jcomments_settings` VALUES ('', '', 'enable_username_check', '1');
INSERT INTO `#__jcomments_settings` VALUES ('', '', 'username_maxlength', '20');
INSERT INTO `#__jcomments_settings` VALUES ('', '', 'forbidden_names', 'administrator,moderator');
INSERT INTO `#__jcomments_settings` VALUES ('... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.