sql stringlengths 6 1.05M |
|---|
<reponame>Shuttl-Tech/antlr_psql
-- file:inherit.sql ln:674 expect:true
explain (costs off) select * from mcrparted where a = 20 and c > 20
|
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('1100777495382228993', 'activity', 'clientmanerger', '[0],[clientmanerger],', '交往记录', '', '/activity', '99', '2', '1', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id... |
<filename>SistemaCenagas/ScriptsBD/insert_catalogo_instalaciones.sql
#use cenagas
#describe instalaciones
#select * from instalaciones
#update instalaciones set registro_eliminado = 0
insert into instalaciones (instalacion, ut_instalacion, clase, km, residencia, region, ut_tramo, sistema, longitud_X_decimal, latitud_Y_... |
<filename>migrations/34_fill_project_id_part1.up.sql<gh_stars>1-10
UPDATE log SET project_id = (SELECT project_id FROM item_project WHERE item_project.item_id=log.item_id LIMIT 1); |
-- Hive script to prepare data for the Vector Tile server
USE tim;
-- create a source talle
/*
CREATE TABLE lep_source STORED AS ORCFILE AS
SELECT
speciesKey,
scientificName,
year,
decimalLatitude AS lat,
decimalLongitude AS lng,
count(*) AS count
FROM prod_b.occurrence_hdfs
WHERE
orderKey=797 AND speci... |
<filename>experiments/rust-prototype-v2/tests/fixtures/bitmap_nested.ddl
module bitmap;
struct Bitmap {
header : Header,
data : Array header.height (Array header.width (Color F32Be)),
};
struct Header {
width : U32Be,
height : U32Be,
};
struct Color (A : Type) {
r : F32Be,
g : F32Be,
b : ... |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 31-Out-2016 às 18:39
-- Versão do servidor: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
<filename>db/examen.sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 13-11-2021 a las 19:31:27
-- Versión del servidor: 10.4.21-MariaDB
-- Versión de PHP: 8.0.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:... |
<reponame>Gonza116/tecnovial
CREATE OR REPLACE
PACKAGE PRUEBAS_COMPRAS AS
PROCEDURE inicializar;
PROCEDURE insertar (nombre_prueba VARCHAR2, w_num_alum VARCHAR2, w_cod_prod integer, w_fecha_compra DATE, salidaEsperada BOOLEAN);
PROCEDURE actualizar_num_alum (nombre_prueba VARCHAR2, w_cod_compra INTEGER, w_num_al... |
<reponame>joao-manoel/rscore-server
/*
Warnings:
- A unique constraint covering the columns `[name]` on the table `Permission` will be added. If there are existing duplicate values, this will fail.
- A unique constraint covering the columns `[name]` on the table `Role` will be added. If there are existing duplic... |
--------------------------------------------------------------------------------
-- REST SESSION ----------------------------------------------------------------
--------------------------------------------------------------------------------
/**
* Запрос данных в формате REST JSON API (Сессия).
* @param {text} pPath... |
<gh_stars>0
SET
ANSI_PADDING ON
GO
/****** Object: Index [IX_WORKORDEROPERATION_FSEDD] Script Date: 06.11.2018 15:13:44 ******/
CREATE NONCLUSTERED INDEX [IX_WORKORDEROPERATION_FSEDD] ON [dbo].[WorkOrderOperation] (
[Fsedd] ASC
) INCLUDE (
[Vornr],
[Arbpl],
[Ltxa1],
[Arbei],
[Ismnw],... |
<filename>DUT S1/M1104 - Intro aux BD/Mini projet/requete5.sql
--Afficher les tables necessaires pour vérifier la requête
SELECT numEquipe, COUNT(*)
FROM joueur
GROUP BY numEquipe;
--Afficher le nom des équipes ayant plus de 5 joueurs
SELECT equipe.nom, COUNT(*)
FROM joueur JOIN equipe ON joueur.numEquipe = equipe.... |
<reponame>jdkoren/sqlite-parser
-- alter3.test
--
-- execsql {
-- CREATE TABLE abc(a, b, c);
-- ALTER TABLE abc ADD d DEFAULT NULL;
-- }
CREATE TABLE abc(a, b, c);
ALTER TABLE abc ADD d DEFAULT NULL; |
-- on SQL Server 2019 and 2017 CU 14
SELECT OBJECT_ID('<MY PROCEDURE>');
GO
CREATE EVENT SESSION [plans_proc] ON SERVER
ADD EVENT sqlserver.query_post_execution_plan_profile(
ACTION(
sqlserver.plan_handle,
sqlserver.session_id,
sqlserver.sql_text)
WHERE (
[database_name]=N'<DB NAME>' AND
[object_i... |
<filename>backend/de.metas.swat/de.metas.swat.base/src/main/sql/postgresql/system/48-de.metas.inoutcandidate/5472170-gh2502-app_M_ShipmentSchedule_drop_UC.sql<gh_stars>1000+
-- make the index not-unique, i.e. allow multiple schedules per order line
DROP INDEX public.m_shipmentschedule_c_orderline;
CREATE INDEX m_shipm... |
-- 17.02.2017 14:01
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,UIStyle,Updated,UpdatedBy) VALUES (0,0,540086,540118,TO_TIMESTAMP('2017-02-17 14:01:16','YYYY-MM-DD HH2... |
-- 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.0.
-- See the LICENSE and NOTICES files in the project root for more information.
CREATE SYNONYM auth.LocalEducationAgencyIdToStuden... |
<reponame>piazzageo/piazza_strawman
GRANT ALL ON geometry_columns TO piazza;
GRANT ALL ON geography_columns TO piazza;
GRANT ALL ON spatial_ref_sys TO piazza;
|
-- Rise Minimal ETL version to 3.0.1
select fn_db_update_config_value('MinimalETLVersion','3.0.1','general');
|
/****** Object: Table [dbo].[T_Annotation_Groups] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Annotation_Groups](
[Annotation_Group_ID] [int] IDENTITY(1,1) NOT NULL,
[Protein_Collection_ID] [int] NOT NULL,
[Annotation_Group] [smallint] NOT NULL,
[Annotation_Type_ID] [int... |
BEGIN;
DROP INDEX if exists secret_sourcetype_idx;
DROP INDEX if exists secret_key_idx;
DROP table if exists secrets;
COMMIT;
|
<reponame>easyj-projects/easyj<gh_stars>1-10
-- 建表语句
CREATE TABLE `easyj_sys_sequence`
(
`name` varchar(50) NOT NULL COMMENT '序列的名字,唯一',
`current_value` bigint NOT NULL COMMENT '当前的值',
`increment_value` tinyint NOT NULL DEFAULT 1 COMMENT '步长,默认为1',
PRIMARY KEY (... |
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/queries/basic/exttab/errlog/sql_concurrency/errlog_conc_truncate_teardown.sql
-- Should not return any rows
SELECT gp_read_error_log('exttab_conc_truncate_1');
SELECT gp_read_error_log('exttab_conc_truncate_2');
|
<gh_stars>10-100
CREATE TABLE qux (
id INTEGER PRIMARY KEY,
name CHARACTER VARYING(255),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
|
<reponame>raguila/islc
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 08, 2016 at 01:48 PM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... |
DROP INDEX IF EXISTS xtv_i18n_text_idx;
CREATE INDEX xtv_i18n_text_idx
ON xml_tree_values (results_id, path, value)
WHERE simple_path ~ 'VipObject.*.Text';
|
CREATE TABLE app_blacklist (
"app_uuid" VARCHAR(36),
"created_ts" TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now(),
PRIMARY KEY (app_uuid)
)
WITH ( OIDS = FALSE );
DROP VIEW view_partial_app_info;
ALTER TYPE approval_status RENAME TO approval_status_temp;
CREATE TYPE approval_status AS ENUM ('PENDING', ... |
<reponame>Zhaojia2019/cubrid-testcases
set timezone '-04:00';
select addtime(time'13:00:00',datetime'1970-1-1 1:00:00');
select addtime(time'13:00:00',datetimetz'1970-1-1 1:00:00');
select addtime(time'13:00:00',datetimeltz'1970-1-1 1:00:00');
select addtime(time'13:00:00',timestamptz'1970-1-1 1:00:00');
select addtime... |
<gh_stars>0
USE Aromaterapia
GO
SELECT OilName,
CASE PlantPartID
WHEN 1 THEN 'Nueces'
WHEN 2 THEN 'Fruta'
WHEN 3 THEN 'Nueces'
WHEN 7 THEN 'Fruta'
WHEN 8 THEN 'Nueces'
WHEN 14 THEN 'Nueces'
WHEN 12 THEN 'Fruta'
WHEN 15 THEN 'Fruta'
ELSE 'Otros'
END AS CategoriaPlantas
FROM Oils
ORDER BY CategoriaPlantas
|
<reponame>arianvaldivieso/pos
-- count_cash_bills --
CREATE TABLE `phppos_register_log_denoms` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`register_log_id` int(11) NOT NULL,
`register_currency_denominations_id` int(11) NOT NULL,
`count` int(11) NOT NULL,
`type` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
CONS... |
<gh_stars>0
CREATE TABLE [dbo].[NotificationMethods] (
[id] CHAR (1) NOT NULL,
[Name] VARCHAR (50) NOT NULL
);
|
INSERT INTO test.division( division_id, division_name ) VALUES ( 1, 'ORTHOCARE' );
INSERT INTO test.doctordetails( id, doctor_name, mr_name, mr_hq, asm_name, region, division, mode_of_disbursement, month, amount, sponsorship, avg_per_month_business_from doctor, avg_per_month_business ) VALUES ( 1, 'Eshwar', 'Nana', 'H... |
<filename>db-creation/db-creation.sql
-- DB creation
create database xyz_company;
use xyz_company;
create table employee(
id int primary key,
name varchar(40),
age int,
department varchar(40)
);
SELECT * FROM xyz_company.employee;
-- stored procedure for insertion and updation
DELIMITER $$
c... |
<filename>infra/init.sql<gh_stars>0
CREATE TABLE IF NOT EXISTS rrdbc.notes (
id BIGINT AUTO_INCREMENT,
title VARCHAR(45) NOT NULL,
content VARCHAR(500) NOT NULL,
creation_date datetime NOT NULL,
identifier varchar(45) NOT NULL,
PRIMARY KEY (id),
INDEX (identifier)
); |
<reponame>Shuttl-Tech/antlr_psql
-- file:bit.sql ln:174 expect:true
INSERT INTO VARBIT_SHIFT_TABLE VALUES (B'11011')
|
<filename>upgrade/files/9.0.0.RC5-9.0.0.RC6/sql.sql<gh_stars>100-1000
UPDATE `sys_form_inputs` SET `db_pass` = '<PASSWORD>', `html` = 3 WHERE `object` = 'sys_comment' AND `module` = 'system' AND `name` = 'cmt_text';
-- Last step is to update current version
UPDATE `sys_modules` SET `version` = '9.0.0-RC6' WHERE (`... |
-- To show max databases connection allowed
SHOW max_connections;
-- To display actives connections
SELECT
COUNT(client_addr)
FROM
pg_stat_activity;
-- To display the activity of your database
SELECT
*
FROM
pg_stat_activity
WHERE
datname = 'your_database_name'
ORDER BY
backend_start;
-- To display co... |
<filename>SIMOES Matthieu/examen/personnes_tested_today.sql
select * from bdd_examen.tested_individu
where date_tested = current_date(); |
INSERT INTO FORMULATED_TYPE ( FORMULATED_TYPE_CODE, DESCRIPTION, UPDATE_TIMESTAMP, UPDATE_USER, OBJ_ID, VER_NBR ) VALUES ( '1', 'X-Ray', sysdate, 'admin', sys_guid(), 1 )
/
INSERT INTO FORMULATED_TYPE ( FORMULATED_TYPE_CODE, DESCRIPTION, UPDATE_TIMESTAMP, UPDATE_USER, OBJ_ID, VER_NBR ) VALUES ( '2', 'Overnight Stay', s... |
<gh_stars>10-100
CREATE INDEX /*i*/echo_notification_event ON /*_*/echo_notification (notification_event);
|
DROP DATABASE IF EXISTS booksearchdb;
CREATE DATABASE booksearchdb; |
<filename>src/main/resources/db/migration/V1.1__criar_tabela_usuario_e_grupo.sql
CREATE TABLE PUBLIC.USER (
id serial not null,
name varchar (100),
login varchar (100) not null,
password text not null,
active boolean not null,
constraint pk_user primary key (id)
);
CREATE TABLE PUBLIC.GROUP (
id serial ... |
\connect genereg2021;;
\copy rbp from 'tblAnno-ready.tsv' delimiter E'\t' CSV NULL as 'NULL';
select count(*) from rbp;
|
create user atg profile "DEFAULT"
identified by atg
default tablespace "USERS"
temporary tablespace "TEMP" account unlock;
GRANT DBA TO atg;
exit; |
CREATE MEMORY TABLE hw_physmessage (
physmessageid integer PRIMARY KEY,
rfcsize integer NOT NULL,
internaldate timestamp NOT NULL,
subject varchar(500) NULL,
sentdate timestamp NULL,
fromaddr varchar(100) DEFAULT ''
);
CREATE MEMORY TABLE hw_message (
messageid integer PRIMARY KEY,
mailbox... |
BEGIN;
ALTER TABLE repo
ADD COLUMN IF NOT EXISTS sources jsonb DEFAULT '{}'::jsonb NOT NULL;
-- Mark the sources columns as read-only using a trigger.
CREATE FUNCTION make_repo_sources_column_read_only() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
IF (OLD.sources != NEW.sources) THEN
... |
create table node_info
(
name varchar(36) not null primary key,
unschedulable boolean not null,
out_of_disk boolean not null,
memory_pressure boolean not null,
disk_pressure boolean not null,
pid_pressure boolean not null,
ready boolean not null,
network_unavailable boolean not null,
cpu_capacity bigi... |
SELECT contact.id,
contact.email,
contact.personal_email,
contact.position,
contact.social_network,
contact.sex,
contact.date_of_birth,
social_network_user.name AS social_network_user,
company.name ... |
-- @testpoint: 创建一个同义词对象,验证大小写。
--同义词是数据库对象的别名,用于记录与其他数据库对象名间的映射关系,用户可以使用同义词访问关联的数据库对象。
CREATE OR REPLACE SYNONYM vi for view_3;
CREATE OR REPLACE SYNONYM AD FOR VIEW_3;
CREATE OR REPLACE SYNONYM ad FOR FALSE_3;
CREATE OR REPLACE SYNONYM AD FOR view_3;
CREATE OR REPLACE SYNONYM ad FOR false_3;
select * from ad;
select... |
UPDATE config SET config_value = 'v1.1.13' WHERE config_key='version'; |
<reponame>borisbotev/SoftUni
SELECT
d.Name AS 'Department Name',
ISNULL(
CAST(AVG(DATEDIFF(DAY, r.OpenDate, r.CloseDate)) AS VARCHAR(50)
), 'no info') AS 'Average Duration'
FROM Departments AS d
JOIN Categories AS c ON c.DepartmentId = d.Id
JOIN Reports AS r ON r.CategoryId = c.Id
GROUP BY d.Name |
ALTER TABLE `Cities` ADD PRIMARY KEY(`CityID`);
|
<reponame>NBThiet/animewebDA2<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th10 27, 2021 lúc 05:27 PM
-- Phiên bản máy phục vụ: 10.4.20-MariaDB
-- Phiên bản PHP: 7.3.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time... |
/*
SQLyog Ultimate v10.42
MySQL - 5.5.5-10.1.37-MariaDB : Database - wahyudb
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY... |
<filename>Database/db_belimobil.sql
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 09, 2019 at 08:39 PM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_... |
SET DEFINE OFF;
CREATE UNIQUE INDEX AFW_12_IP_APROB_STAT_PK ON AFW_12_INSTA_PROCS_APROB_STAT
(SEQNC)
LOGGING
/
|
<filename>pg_rational--0.0.1--0.0.2.sql<gh_stars>100-1000
-- there are no sql changes between these versions
|
CREATE PROC usp_GetEmployeesSalaryAboveNumber (@number DECIMAL(18, 4))
AS SELECT FirstName,
LastName FROM Employees
WHERE Salary >= @number
EXEC dbo.usp_GetEmployeesSalaryAboveNumber |
-- file:create_type.sql ln:21 expect:true
CREATE TYPE city_budget (
internallength = 16,
input = int44in,
output = int44out,
element = int4,
category = 'x', preferred = true )
|
-- file:join.sql ln:1655 expect:true
select * from
int8_tbl a left join
lateral (select *, a.q2 as x from int8_tbl b) ss on a.q2 = ss.q1
|
<gh_stars>1-10
--On insert of new image info rows we automatically create an entry in the state table
CREATE OR REPLACE FUNCTION log_image_info_insert()
RETURNS trigger AS
'
BEGIN
INSERT INTO Image_Tagging_State(ImageId,TagStateId,ModifiedByUser,ModifiedDtim,CreatedDtim)
VALUES(N... |
DECLARE @CurrDB SYSNAME = 'MyDBName'
DECLARE @CMD NVARCHAR(MAX);
SELECT @CMD = ISNULL(@CMD + N',
', N'') + N'(NAME = ' + QUOTENAME(name) + N'
, FILENAME = ' + QUOTENAME(LEFT(physical_name, LEN(physical_name) - CHARINDEX('\', REVERSE(physical_name)) + 1)
+ DB_NAME(database_id) + '_' + REPLACE(NEWID(),'-','') + '.ss',... |
<reponame>9SMTM6/rustpad
CREATE TABLE document(
id TEXT PRIMARY KEY,
text TEXT NOT NULL,
language TEXT
)
|
<filename>apps/dolibarr/htdocs/custom/module_poslabels-3.5/labelprint/sql/update_01.sql<gh_stars>0
ALTER TABLE llx_labelprint ADD price_level INT NULL DEFAULT NULL; |
<gh_stars>0
-- Create the role
create role ROL_READONLY;
-- Grant/Revoke system privileges
grant create session to ROL_READONLY;
|
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: usermanagement
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU... |
/* Roles for czar_user */
grant czar_role to czar_user;
grant hdb_meta_role to czar_user;
alter user czar_user default role hdb_meta_role, czar_role;
/* Privs for meta_data_user */
grant hdb_meta_role to meta_data_user;
grant model_priv_role to meta_data_user;
alter user meta_data_user
default roles connect, hdb_met... |
-- Create table
create table TRACELOG
(
OPTID VARCHAR2(20),
LOGINUSER VARCHAR2(20),
OPT_URL VARCHAR2(80),
OPT_NAME VARCHAR2(80),
ORG_PARAMS VARCHAR2(2080),
OPT_TIME TIMESTAMP(6),
OPT_RESULT VARCHAR2(100),
FROM_IP VARCHAR2(100)
);
-- Add comments to the table
comment on table TRACELOG
i... |
<gh_stars>0
-- Create table aa
create table aa (
id integer primary key,
name varchar not null
);
insert into aa values ( 1, 'aa1' );
grant all on aa to test@localhost;
-- table: aa
-- tag: d5ae8840-2848-4382-88e8-61bf65e8e9ec
|
-- phpMyAdmin SQL Dump
-- version
-- http://www.phpmyadmin.net
--
-- Хост: esin.mysql
-- Время создания: Май 08 2019 г., 08:41
-- Версия сервера: 5.6.25-73.1
-- Версия PHP: 5.6.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40... |
SELECT d.*, e.type AS event_type,
ARRAY_AGG_NOTNULL(dctc.taxon_concept_id) AS taxon_concept_ids,
ARRAY_AGG(dcge.geo_entity_id) AS geo_entity_ids,
ARRAY_AGG_NOTNULL(pd.proposal_outcome_id) || ARRAY_AGG_NOTNULL(rd.review_phase_id) || ARRAY_AGG_NOTNULL(rd.process_stage_id) AS document_tags_ids
FROM documents d
LEFT ... |
create table x(a int);
create table x(a int);
drop table x; |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jun 20, 2018 at 06:23 PM
-- Server version: 5.7.22-0ubuntu18.04.1
-- PHP Version: 7.2.5-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... |
create database lvblog;
use lvblog;
select * from posts;
select * from comments;
select * from users;
SET SQL_SAFE_UPDATES = 0;
delete from posts where id in(13,19,14,18);
delete from comments;
drop table comments;
drop table users;
insert into comments
(
id,
body,
created_at,
updated_at
)
values
(
1... |
<reponame>Clypeus/ClypeusInfectionManagementSystem<filename>MAIN/Clypeus/Clypeus.Sql.Database/Tables/Medicinals/DrugGroupMembers.sql
CREATE TABLE [medicinals].[DrugGroupMembers]
(
DrugGroupId INT NOT NULL,
DrugId INT NOT NULL,
PRIMARY KEY (DrugGroupId,DrugId),
CONSTRAINT [FK_Group_DrugGroup] FOREIGN KEY ([DrugGrou... |
<filename>3bi/aula2/squema.sql
CREATE TABLE pessoa (
id SERIAL PRIMARY KEY,
nome VARCHAR(50),
email VARCHAR(50),
login VARCHAR(25),
senha VARCHAR(50)
); |
<filename>src/main/resources/flyway/session-db/V8__Add_comp_column.sql
alter table Job add column comp varchar(255);
|
<reponame>FeiZhan/Algo-Collection
# Write your MySQL query statement below
SELECT class FROM courses
GROUP BY class
HAVING COUNT(DISTINCT student) >= 5; |
SELECT
first_name,
last_name
FROM actor
WHERE last_name LIKE 'A%'
UNION
SELECT
first_name,
last_name
FROM customer
WHERE last_name LIKE 'A%' |
<reponame>uk-gov-mirror/SkillsFundingAgency.das-qna-api<gh_stars>1-10
CREATE TABLE [ApplicationSequences]
(
[Id] [uniqueidentifier] NOT NULL DEFAULT NEWID(),
[ApplicationId] [uniqueidentifier] NOT NULL,
[SequenceNo] [int] NOT NULL,
[IsActive] [bit] NOT NULL DEFAULT 0,
CONSTRAINT [PK_ApplicationSequences] PRIMAR... |
-- vacuum2.test
--
-- execsql {
-- INSERT INTO t1 VALUES('hello');
-- INSERT INTO t2 VALUES('out there');
-- }
INSERT INTO t1 VALUES('hello');
INSERT INTO t2 VALUES('out there'); |
<filename>routines/general/eval.sql
--
-- Evaluates the queries generated by a given query.
-- Given query is expected to be a SQL generating query. That is, it is expected to produce,
-- when invoked, a single text column consisting of SQL queries (each row may contain one or mroe queries).
-- The eval() procedure wil... |
<filename>app/mock-data/get_locales query example.sql
SET SERVEROUTPUT ON
DECLARE
returnVal SYS_REFCURSOR;
charOutput VARCHAR2(80);
BEGIN
DBMS_OUTPUT.PUT_LINE('results for fema_data.get_locales(): ' || q'['TX','county', NULL,returnVal]');
DBMS_OUTPUT.NEW_LINE();
fema_data.get_locales('TX','county', NULL, r... |
CREATE TABLE role (
id int8 NOT NULL,
"name" varchar(255),
PRIMARY KEY (id)
);
INSERT INTO "public".role (id, "name")
VALUES (1, 'SuperAdmin');
INSERT INTO "public".role (id, "name")
VALUES (2, 'Admin');
INSERT INTO "public".role (id, "name")
VALUES (3, 'User');
|
<reponame>morsapaes/mz-hack-day-2022
/*
You can use this this model file to create a fact or dim table by joining existing
models. Don't forget to document and apply tests to any dbt model models you have created
*/
{{ config(
enabled = false,
materialized ='source'
) }}
select * from {{ ref('stg_example')... |
<reponame>ttzhanghuiyuan/zhongc
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50540
Source Host : localhost:3306
Source Database : zhongc
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2018-04... |
<reponame>pubtile/pubtile-basistestdata-examples<filename>pubtile-basistestdata-example-classic/db/pubtile-basistestdata-exmaple.sql
DROP DATABASE IF EXISTS pubtile_basistestdata_example;
CREATE DATABASE pubtile_basistestdata_example DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;
use pubtile_basis... |
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table event (
id bigint not null,
title varchar(255),
all_day boolean,
start timestamp,
end ... |
<reponame>yudong2015/openpitrix
ALTER TABLE job
ADD COLUMN owner_path VARCHAR(255) NOT NULL;
CREATE INDEX job_owner_path_idx
ON job (owner_path);
UPDATE job
SET owner_path = CONCAT(':', owner);
|
<filename>testsql.sql<gh_stars>0
select * from t
|
<reponame>opencars/edrmvs
CREATE TABLE registrations(
"brand" TEXT,
"capacity" INT,
"color" TEXT NOT NULL,
"d_first_reg" DATE,
"d_reg" DATE,
"fuel" TEXT,
"kind" TEXT,
"make_year" INT NOT NULL,
"model" TEX... |
<reponame>cxiaolong/XboxBackend
/*==============================================================*/
/* DBMS name: MySQL 5.7 */
/* 陈小龙 Created on: 2021/05/15 */
/*==============================================================*/
USE hezi;
/* 向用户表插入一... |
<gh_stars>0
DROP DATABASE IF EXISTS books_app;
create database books_app;
\c books_app;
DROP TABLE IF EXISTS books;
CREATE TABLE books(
id SERIAL PRIMARY KEY,
author VARCHAR(255),
title VARCHAR(255),
book_id VARCHAR(255),
image_url VARCHAR(255),
summary VARCHAR(255),
bookshelf VARCHAR(255)
); |
<gh_stars>0
CREATE OR REPLACE FUNCTION housedb_tests.test_create_timeseries()
RETURNS SETOF TEXT AS $$
DECLARE
tsid1 bigint;
tsid2 bigint;
BEGIN
perform housedb_security.add_permission('guest', 'CREATE', 'locations','.*');
perform housedb_security.add_permission('guest', 'CREATE', 'timeseries','.*');
... |
DROP VIEW IF EXISTS `penalty_reasons_view`;
DROP VIEW IF EXISTS `penalties_view`; |
<gh_stars>0
-- 1.How many songs are there in the playlist “Grunge”?
SELECT COUNT(*) FROM playlisttrack WHERE PlaylistId = (
SELECT playlist.PlaylistId FROM playlist where Name = "Grunge");
-- 2.Show information about artists whose name includes the text “Jack” and about artists whose
-- name includes the text “Jo... |
alter table ORDERS change ORDERID ORDERID varchar(30) default '' not null;
alter table INVENTORY_DETAIL change OUR_ORDERID OUR_ORDERID varchar(30) default '' not null;
alter table AMAZON_ORDERS change OUR_ORDERID OUR_ORDERID varchar(30) default '' not null;
alter table AMAZON_ORDER_EVENTS change ORDERID ORDERID varchar... |
create table if not exists Micros (
id char(64) primary key,
micro_link text not null,
real_link text not null,
creation int not null,
expiration int not null,
hits int default 0,
public bool not null
);
|
<gh_stars>1-10
CREATE OR REPLACE FUNCTION da.datasetbyid(_dataid integer)
RETURNS TABLE( datasetid integer, datasettype character varying)
LANGUAGE sql
AS $function$
SELECT ndb.datasets.datasetid, ndb.datasettypes.datasettype
FROM ndb.chronologies INNER JOIN ndb.collectionunits ON ndb.chronologies.collectionu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.